I have following code
final String pattern = "MM/dd/YYYY";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
LocalDate localDate = LocalDate.parse(date, formatter);
and while trying to parse String date = "05/29/2003"
I receive an exception:
Caused by: java.time.DateTimeException: Unable to obtain LocalDate from TemporalAccessor: {WeekBasedYear[WeekFields[SUNDAY,1]]=2023, DayOfMonth=29, MonthOfYear=5},ISO of type java.time.format.Parsed
What is the reason ?