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

[intl-datetimeformat] Wrong AM/PM formatting #2106

Closed
mrijke opened this issue Sep 16, 2020 · 3 comments
Closed

[intl-datetimeformat] Wrong AM/PM formatting #2106

mrijke opened this issue Sep 16, 2020 · 3 comments
Labels

Comments

@mrijke
Copy link
Contributor

mrijke commented Sep 16, 2020

Which package?
intl-datetimeformat

Describe the bug
When formatting new Date("2020-09-16T11:55:32.491+02:00") with a 12 hour clock locale (e.g. "en-US"), it gets formatted as 11:55 PM

To Reproduce
Visit the following codesandbox: https://codesandbox.io/s/flamboyant-nightingale-zycp7?file=/src/App.tsx

Comment out line 4 (and also line 8) to switch to your browsers native Intl implementation, I tried with Chrome. When doing this, it correctly renders as 11:55 AM

Expected behavior
The time should be rendered as 11:55 AM

Desktop (please complete the following information):

  • OS: Windows
  • Browser chrome
  • Version 85
@mrijke mrijke added the bug label Sep 16, 2020
@longlho
Copy link
Member

longlho commented Sep 18, 2020

Thanks for reporting! We'll take a look asap.

@longlho
Copy link
Member

longlho commented Sep 18, 2020

@formatjs/intl-datetimeformat@2.6.7 should have the fix

@mrijke
Copy link
Contributor Author

mrijke commented Sep 21, 2020

Yup, confirmed working 👍
Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants