ecma402 icon indicating copy to clipboard operation
ecma402 copied to clipboard

Add support for -u extension 'rg'

Open FrankYFTang opened this issue 1 year ago • 5 comments

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

FrankYFTang avatar Jul 18 '24 19:07 FrankYFTang

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

FrankYFTang avatar Jul 18 '24 23:07 FrankYFTang

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:

  1. -u-fw
  2. -u-rg
  3. -u-ca
  4. region
  5. -u-sd

And there is also https://unicode-org.atlassian.net/browse/CLDR-17151 to promote the -u-sd to be higher up.

sffc avatar Jul 19 '24 00:07 sffc

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

FrankYFTang avatar Jul 30 '24 20:07 FrankYFTang

be aware of https://github.com/unicode-org/cldr/pull/4049

FrankYFTang avatar Sep 16 '24 18:09 FrankYFTang

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.

FrankYFTang avatar Dec 18 '24 23:12 FrankYFTang