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

Update firstDay tests to latest spec after PR 79 #4141

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

FrankYFTang
Copy link
Contributor

Spec Changes merged
tc39/proposal-intl-locale-info#79

@FrankYFTang FrankYFTang requested a review from a team as a code owner July 9, 2024 20:54
@FrankYFTang
Copy link
Contributor Author

@anba @ben-allen @sffc

@FrankYFTang
Copy link
Contributor Author

@trflynn89

@FrankYFTang FrankYFTang changed the title Update firstDay test to latest spec after PR 79 Update firstDay tests to latest spec after PR 79 Jul 9, 2024
@FrankYFTang
Copy link
Contributor Author

@Ms2ger

Copy link
Contributor

@ptomato ptomato left a 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.

@ptomato ptomato merged commit 7b15438 into tc39:main Jul 10, 2024
8 checks passed
@@ -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"],
Copy link
Contributor

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"

Copy link
Contributor

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?

Copy link
Contributor

@trflynn89 trflynn89 Jul 11, 2024

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah... that is true

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

Successfully merging this pull request may close these issues.

None yet

3 participants