Skip to content

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

@mrijke

Description

@mrijke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions