ecma402
ecma402 copied to clipboard
Add support for -u extension 'rg'
This is an issue fork out from @anba's comment in the review of https://github.com/tc39/proposal-intl-locale-info/pull/83
During 2024-07-18, TG2 believe the patch @anba suggested has other undesireable side effect, such as "fr-u-ca-hebrew" may not return the right result .
What @anba suggest is
- 1. Let _r_ be a record whose fields are defined by <emu-xref href="#table-locale-weekinfo-record"></emu-xref>, with values based on _locale_.
+ 1. Let _languageId_ be the longest prefix of _locale_ matched by the <code>unicode_language_id</code> Unicode locale nonterminal.
+ 1. Let _r_ be a record whose fields are defined by <emu-xref href="#table-locale-weekinfo-record"></emu-xref>, with values based on _languageId_.
but that remove not just 'rg' but also 'ca'
The question is how should we address the issue that we want to make sure right now we will not listen to 'rg' but will still respect to 'ca'.
@sffc
Regarding should the calendar value in -u-ca- beside iso8601 impact the first day of week. I filed a CLDR ticket at https://unicode-org.atlassian.net/browse/CLDR-17819
According to UTS 35, https://unicode.org/reports/tr35/tr35-dates.html#first-day-overrides, which was added as part of https://unicode-org.atlassian.net/browse/CLDR-16866, -u-ca can impact the first day of week, in the following order:
- -u-fw
- -u-rg
- -u-ca
- region
- -u-sd
And there is also https://unicode-org.atlassian.net/browse/CLDR-17151 to promote the -u-sd to be higher up.
The first day of week will respect rg after ICU75 (see https://github.com/unicode-org/icu/pull/2711/ ) currently v8 is still on 74.2
be aware of https://github.com/unicode-org/cldr/pull/4049
This issue is transfered from Intl Locale Info API to ECMA402 because the nature of the issue deal with the "rg" extension and require an overall discussion beyond the Intl Locale API itself.