You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please consider adding some kind of org.springframework.format.datetime.standard.YearFormatter (similarly to org.springframework.format.datetime.standard.YearMonthFormatter).
I believe it's more convenient and self-explanatory to use java.time.Year as param in e.g. handlers whenever it really means a year and so on.
Good point. The main reason why java.time.Year and also java.time.Month weren't covered before is because they didn't exist in Joda-Time (which is where our JSR-310 support originated).
I've added dedicated formatters for both java.time.Year and java.time.Month now, parsing the JSR-310 way for the former (i.e. simple year numbers) and leniently resolving the enum constant name in any case for the latter (i.e. not just "JANUARY" which worked before already but also "January" etc).
Activity
spring-projects-issues commentedon Jan 30, 2018
Juergen Hoeller commented
Good point. The main reason why
java.time.Yearand alsojava.time.Monthweren't covered before is because they didn't exist in Joda-Time (which is where our JSR-310 support originated).I've added dedicated formatters for both
java.time.Yearandjava.time.Monthnow, parsing the JSR-310 way for the former (i.e. simple year numbers) and leniently resolving the enum constant name in any case for the latter (i.e. not just "JANUARY" which worked before already but also "January" etc).spring-projects-issues commentedon Jan 30, 2018
Michał Sobkiewicz commented
Great! Thanks a lot! :)