你好,我手头有一个短日期格式,格式为E dd/MM,有没有办法将其转换为LocalDate。
String date = "Thu 07/05";
String formatter = "E dd/MM";
final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
final LocalDate localDate = LocalDate.parse(date, formatter);`
但它抛出了异常 java.time.format.DateTimeParseException: Text 'Thu 07/05' could not be parsed: Unable to obtain LocalDate from TemporalAccessor: {MonthOfYear=5, DayOfMonth=7, DayOfWeek=4},ISO of type java.time.format.Parsed
我们有没有办法解决这个问题?