Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleDateFormat limitations #147

Open
JohnVeness opened this issue Aug 8, 2024 · 2 comments
Open

SimpleDateFormat limitations #147

JohnVeness opened this issue Aug 8, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@JohnVeness
Copy link

Hi. I have set my "Day header date format" to "EEE d MMM". This produces dates like "Sun 11 Aug". This mostly works fine, other than dates in September which show like "Mon 9 Sept" not "Mon 9 Sep" as I'd expect.

Searching around this seems to be a problem with the old SimpleDateFormat API and the advice appears to be to change to the more modern java.time API. Is this possible?

Thanks for reading, and for this widget, which I have used for many years :)

@yvolk yvolk added the help wanted Extra attention is needed label Nov 11, 2024
@yvolk
Copy link
Member

yvolk commented Nov 11, 2024

Hello @JohnVeness!
Yes, I see that DateTimeFormatter is described as a newer solution... https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/time/format/DateTimeFormatter.html
And I see that the migration is not trivial, see e.g. https://stackoverflow.com/questions/53830321/dateformat-to-datetimeformatter?noredirect=1&lq=1
So we will need extensive testing (and probably writing new unit tests...), including different locales...

Making this change just for one small case looks like overkill,
but you could volunteer to make this change :-)

@JohnVeness
Copy link
Author

Thanks for looking into this! I think implementing this is beyond my skills, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants