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

iOS DateTimeFormat { hour: "numeric", minute: "numeric" } does not use locale setting #1192

Open
andreialecu opened this issue Nov 19, 2023 · 2 comments
Labels
need more info Awating additional info before proceeding

Comments

@andreialecu
Copy link

Bug Description

      console.log(
        new Intl.DateTimeFormat('en-US', {
          hour: 'numeric',
          minute: 'numeric',
        }).format(new Date('2021-09-30T18:00:00.000Z')),
      );

The above prints 21:00 (incorrect because of locale) on iOS, but 9:00 PM (correct) on Android.

On iOS, using timeStyle: 'short' correctly prints 9:00 PM but on Android it prints 9/30/2021 as timeStyle is not implemented:

      console.log(
        new Intl.DateTimeFormat('en-US', {
          timeStyle: 'short'
        }).format(new Date('2021-09-30T18:00:00.000Z')),
      );
@andreialecu andreialecu added the bug Something isn't working label Nov 19, 2023
@andreialecu
Copy link
Author

Related: #1172 (comment)

@neildhar
Copy link
Contributor

Hey @andreialecu, thanks for reporting this. Could you also share which version of Hermes you are using, as well as the iOS/Android version you are testing on?

It would also be helpful to see what the output of resolvedOptions is to see what locale the implementation is actually using.

@tmikov tmikov added need more info Awating additional info before proceeding and removed bug Something isn't working labels Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Awating additional info before proceeding
Projects
None yet
Development

No branches or pull requests

3 participants