archives

« Bugzilla Issues Index

#2081 — 9.2.5 ResolveLocale: Non-simple type in unicode locale extension not handled


Per http://unicode.org/reports/tr35/#Unicode_locale_identifier:

> keyword ::= key [sep type]
> key ::= 2alphanum
> type ::= 3*8alphanum *(sep 3*8alphanum)


But 9.2.5 ResolveLocale steps 11.g.1.* only seem to handle the case when `type` is just `3*8alphanum`.

test case:
new Intl.DateTimeFormat("en-u-ca-ethiopic-amete-alem").resolvedOptions().calendar

This returns just "ethiopic" but I'd expect either "ethiopic-amete-alem" or "ethioaa".

This is also visible with the newly introduced "islamic-*" calendar variations from CLDR 24 which are all reduced to "islamic".


Fixed in https://github.com/tc39/ecma402/commit/7cb955c1f6bf00c4e218c6b87ee247a0e320187e