-
Notifications
You must be signed in to change notification settings - Fork 454
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
Update firstDay tests to latest spec after PR 79 #4141
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this matches my understanding of the change in the 2023-11 meeting.
Spec Changes merged tc39/proposal-intl-locale-info#79
@@ -50,6 +47,24 @@ const validFirstDayOfWeekOptions = [ | |||
[6, "en-u-fw-sat"], | |||
[7, "en-u-fw-sun"], | |||
[0, "en-u-fw-sun"], | |||
[true, "en-u-fw-true"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FrankYFTang is this one correct? IIRC true
is dropped from canonical locales. And that's how v8, SpiderMonkey, and LibJS all behave:
> new Intl.Locale('en-u-fw-true').toString()
"en-u-fw"
> new Intl.Locale('en-u-fw-false').toString()
"en-u-fw-false"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see that in CanonicalizeUValue, where should I be looking for that behvaiour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would fall under step 2, which defers to TR-35.
https://unicode.org/reports/tr35/#Canonical_Unicode_Locale_Identifiers
A unicode_locale_id has canonical syntax when:
- Any type or tfield value "true" is removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah... that is true
Spec Changes merged
tc39/proposal-intl-locale-info#79