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

@formatjs/intl-datetimeformat: missing am/pm indicator in some locales #2291

Closed
hasyimibhar opened this issue Nov 7, 2020 · 1 comment
Closed
Labels

Comments

@hasyimibhar
Copy link

hasyimibhar commented Nov 7, 2020

Which package?
@formatjs/intl-datetimeformat

Describe the bug
When hour12 is set to true and hourCycle is set to h12, the output of format is missing the am/pm indicator for some locales. From my test (not exhaustive), it's missing for the following locales:

  • en-MY
  • id-ID
  • zh-Hant-HK (下午 instead of pm is missing)
  • ja-JP (午後 instead of pm is missing)

To Reproduce
Steps to reproduce the behavior:

Run this with Node.js:
https://gist.github.com/hasyimibhar/bc8e17ce4f922253ede90b1070f3c1a1

It outputs 01 Feb 2020, 06:10:10.

Replace en-MY to test with other locales.

Expected behavior
On Chrome Version 86.0.4240.111 (Official Build) (x86_64), it outputs 01 Feb 2020, 06:10:10 pm.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@hasyimibhar hasyimibhar added the bug label Nov 7, 2020
@longlho
Copy link
Member

longlho commented Nov 9, 2020

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

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