SimpleDateFormat giving wrong date instead of error

Use DateFormat.setLenient(false) to tell the DateFormat/SimpleDateFormat that you want it to be strict.

Leave a Comment