Make SimpleDateFormat.parse() fail on invalid dates (e.g. month is greater than 12)

You need to make it non-lenient. Thus,

format.setLenient(false);

should do it.

Leave a Comment