question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@DateTimeFormat support for YearMonth, MonthDay, Year [SPR-14839]

See original GitHub issue

Kazuki Shimizu (@kazuki43zoo) opened SPR-14839 and commented

I hope to support the @DateTimeFormat annotation for Joda-Time’s YearMonth, MonthDay, and Year types, analogous to the existing support for the corresponding JSR-310 types.

For example:

public class AccountForm {

    @DateTimeFormat(pattern="MM/uuuu")
    private YearMonth expirationMonth;

    @DateTimeFormat(pattern="M/d")
    private MonthDay dayOfBirth;

    // ...
}

Affects: 4.3.3

Issue Links:

  • #18095 Conversion support for java.time.YearMonth (as well as MonthDay)
  • #20016 ScheduledAnnotationBeanPostProcessor does not support Duration syntax
  • #20983 Missing java.time.Year Formatter

Referenced from: pull request https://github.com/spring-projects/spring-framework/pull/1215

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ioxuacommented, Apr 1, 2020

Any reason this issue is frozen?

0reactions
snicollcommented, Nov 24, 2021

Closing in favor of PR #1215

Read more comments on GitHub >

github_iconTop Results From Across the Web

YearMonth (Java Platform SE 8 ) - Oracle Help Center
YearMonth is an immutable date-time object that represents the combination of a year and month. Any field that can be derived from a...
Read more >
Intl.DateTimeFormat() constructor - JavaScript - MDN Web Docs
Implementations are required to support at least the following subsets: weekday , year , month , day , hour , minute , second ......
Read more >
datetime — Basic date and time types — Python 3.11.1 ...
While date and time arithmetic is supported, the focus of the ... Attributes: year , month , day , hour , minute ,...
Read more >
Extended Date/Time Format (EDTF) Specification
The Extended Date/Time Format (EDTF) was created by the Library of ... Example 3 '2004-06-11%' entire date (year-month-day) uncertain and ...
Read more >
Python Dates - W3Schools
Directive Description Example Try it %a Weekday, short version Wed Try it » %A Weekday, full version Wednesday Try it » %w Weekday as a number...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found