1.将已知格式的日期字符串转换为LocalDate
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");LocalDate ld = LocalDate.parse(dateString, dateTimeFormatter);