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

Issue : format function throw error when locale passed including numbering system ( ar-u-nu-arab ) #68

Open
peter-emad99 opened this issue Aug 10, 2024 · 0 comments

Comments

@peter-emad99
Copy link

i didn't find way to pass {numberingSystem:'arab'} , it's a valid option to intl.DateTimeFormatOptions

but i can include it in locale string like this ar-u-nu-arab

this throw invalid locale tag ar-u-nu-arab-u-hc-h12 error as format function already append hour cycle to the locale

possible solutions

  • providing a way to customize the intl.DateTimeFormatOptions so we can path {numberingSystem:'arab'}
  • removing the -u-hc-h12 appended to locale and using hour12 and hourCycle options instesd
  • auto resolving the numbering system from the locale by leveraging the Intl.Locale().numberingSystem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant