更新时间:2023-01-17 08:12:23
LocalDate.parse
java.time
类可以直接解析 ISO 8601 字符串,而无需指定格式设置模式.
LocalDate.parse
The java.time
classes can parse ISO 8601 strings directly, with no need to specify a formatting pattern.
For a date-only value, without a time of day or time zone, use the LocalDate
class.
LocalDate ld = LocalDate.parse("2016-03-21");