LocalDate.parse does not validate leap years

30 views Asked by At
DateTimeFormatter formatters = DateTimeFormatter.ofPattern("uuuu-MM-dd");
endDate = LocalDate.parse(endDateString, formatters);

Why does the above code not throw exceptions for leap years? If you give 2023-02-31, no validation error is thrown.

0

There are 0 answers