Hi everyone,
Ok so I have a basic
Java question, I wasn't sure if I should be placing this in the beginning Java section or this one, so I tried to make my best judgement.
I am currently facing a problem (a sub problem of a much larger assignment for school) where I need to validate a date. In particular, the date Feb 31st is considered to be invalid. The validation I must perform is to determine, based on the day of month entered, if it is a legal day for that particular month.
I have searched in many places looking for suggestions or concepts that might give way to how to go about performing this algorithm (without brute forcing it), and the best lead I have currently goes something like this:
The issue here is that 2010-02-31 seems to parse without throwing the ParseException. Is there something in particular I am missing here or am so far off of the correct answer that I need to consider different approaches?
Thanks in advance!
Anthony