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

Get current locale by new Intl.Locale() without tag. #883

Open
WORMSS opened this issue Feb 3, 2024 · 3 comments
Open

Get current locale by new Intl.Locale() without tag. #883

WORMSS opened this issue Feb 3, 2024 · 3 comments

Comments

@WORMSS
Copy link

WORMSS commented Feb 3, 2024

Is there any reason I need to do

new Intl.Locale(new Intl.DateTimeFormat().resolvedOptions().locale).weekInfo.firstDay

instead of just

new Intl.Locale().weekInfo.firstDay

to get the current locale?

@zbraniecki
Copy link
Member

How would you like to handle a situation where because of available data your datetimeformat resolved locale is different from your numberformat resolved locale?

@FrankYFTang
Copy link
Contributor

This is requesting that new Intl.Locale() without a tag to return the DefaultLocale() . I think this is different from what this proposal intend to do - accessing information in a determined locale. Move to ECMA402 for discussion

@FrankYFTang FrankYFTang transferred this issue from tc39/proposal-intl-locale-info Apr 25, 2024
@FrankYFTang FrankYFTang changed the title Get current locale. Get current locale by new Intl.Locale() without tag. Apr 25, 2024
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

4 participants