date parsing accepts 05/05/1999 5/5/1999, etc


is there rudimentary proceed parse date competence mm/dd/yyyy, m/d/yyyy, combination? i.e. 0 discretionary before unparalleled number month.



to manually, use:



string[] datefields = datestring.split("/");
int month = integer.parseint(datefields[0]);
int = integer.parseint(datefields[1]);
int year = integer.parseint(datefields[2]);


and countenance with:



datestring.matches("\\d\\d?/\\d\\d?/\\d\\d\\d\\d")


is there simpledateformat jodatime hoop this?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members