DateTimeFormatter Support for Single Digit Day of Month and Month of Year
问题 DateTimeFormmater doesn't seem to handle single digit day of the month: String format = "MM/dd/yyyy"; String date = "5/3/1969"; System.out.println(new SimpleDateFormat(format).parse(date)); System.out.println(LocalDate.parse(date, DateTimeFormatter.ofPattern(format))); In this example, SimpleDateFormat correctly parses the date, but DateTimeFormatter throws an exception. If I were to use zero padded dates, e.g., "05/03/1969", both work. However, if either the day of month or the month of year