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

March and October get messed up in Safari #6

Closed
wojtekmaj opened this issue Nov 10, 2017 · 4 comments
Closed

March and October get messed up in Safari #6

wojtekmaj opened this issue Nov 10, 2017 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@wojtekmaj
Copy link
Owner

@jtwhittington reported in wojtekmaj/react-date-picker#14:

2007 ok 2006 broken

Happens only on Safari so far that I've seen. March duplicates itself and replaces April once you go back some years - October does the same to November. Looking into it myself, though if you have any ideas I'd be happy to hear them. Will make a PR if I figure it out.

@wojtekmaj wojtekmaj self-assigned this Nov 10, 2017
@wojtekmaj wojtekmaj added the bug Something isn't working label Nov 10, 2017
@wojtekmaj
Copy link
Owner Author

The reason for this is very simple. To format date, I take the beginning of each month and use Intl.DateTimeFormat to get the name of the month in a given language. However, historical timezones are messed up on WebKit for some years. On Chrome, it happens for 1995 in my case.
I have filed a bug on that in Chrome already.
A workaround would be to use something like the middle of the month for taking month name and I think that would be a good approach.

@wojtekmaj
Copy link
Owner Author

Fixed, will be public with next release.

@jtwhittington
Copy link

Yeah I realized this was a bug on the Intl.DateTimeFormat, thanks for the fix!

@wojtekmaj
Copy link
Owner Author

Thank you for reporting! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants