How to sanity check a date in java

Posted by Bloodboiler on Stack Overflow See other posts from Stack Overflow or by Bloodboiler
Published on 2008-10-22T18:04:08Z Indexed on 2010/04/12 14:02 UTC
Read the original article Hit count: 332

Filed under:
|
|
|

I find it curious that the most obvious way to create Date objects in Java has been deprecated and appears to have been "substituted" with not so obvious to use lenient calendar. So...

How do you check that a date given as a combination of day, month and year is a valid date? For instance a date 2008-02-31 (as in yyyy-mm-dd) would be invalid date.

© Stack Overflow or respective owner

Related posts about java

Related posts about dates