我正在尝试将字符串解析"Sunday, July 4, 2021"
为LocalDate
以下内容:
string this.selectedDate = "Sunday, July 4, 2021";
LocalDate date = LocalDate.parse(this.selectedDate);
但我收到此错误:
java.time.format.DateTimeParseException: Text 'Sunday, July 4, 2021' could not be parsed at index 0
如何将这样的字符串完整日期转换为 LocalDate?