我正在使用这个DateTimeFormatter:
DateTimeFormatter.ofPattern("ddMMYY")
Run Code Online (Sandbox Code Playgroud)
我想解析字符串150790,我得到了这个错误:
Unable to obtain LocalDate from TemporalAccessor: {DayOfMonth=15, MonthOfYear=7, WeekBasedYear[WeekFields[MONDAY,4]]=2090},ISO of type java.time.format.Parsed
Run Code Online (Sandbox Code Playgroud)
显然,我希望得到以下内容TemporalAccessor:
{DayOfMonth=15, MonthOfYear=7, WeekBasedYear=1990}
Run Code Online (Sandbox Code Playgroud)
你知道我为什么得到2090而不是1990年?
谢谢你的帮助