java - How to check whether date is valid -



java - How to check whether date is valid -

i can utilize parseint , if-else-statements , i'm stuck right now. understood logic, can't command illustration feb dates , jump years. wrote statements it.

boolean jump = false; if (((year % 4) == 0) && ((year % 100) == 0) && ((year % 400) == 0) && ((year % 4000) != 0)) jump = true; else jump = false;

but can't contact february. can help me please?

leap year can evaluated by:

if ((year % 4 == 0) && (year % 100 != 0)) { jump = true; } else if (year % 400 == 0) { jump = true; } else { jump = false; }

java date

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -