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 hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?