From 74e084ec031fc872767d4cf384b86c0374916ffc Mon Sep 17 00:00:00 2001
From: Frank Tang
Date: Thu, 29 Sep 2022 18:17:52 -0700
Subject: [PATCH 01/10] Normative: Stage4 PR for proposal-intl-enumeration
Plan to suggest moving to Stage 4 in Nov 2022
https://github.com/tc39/proposal-intl-enumeration
It is already implemented in Chrome m99, Safari 15.4 and Firefox 93.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#browser_compatibility
---
spec/intl.html | 27 ++++++++++
spec/locales-currencies-tz.html | 95 ++++++++++++++++++++++++++++++++-
2 files changed, 120 insertions(+), 2 deletions(-)
diff --git a/spec/intl.html b/spec/intl.html
index a6ff46b8..8a612be9 100644
--- a/spec/intl.html
+++ b/spec/intl.html
@@ -117,5 +117,32 @@ Intl.getCanonicalLocales ( _locales_ )
1. Return CreateArrayFromList(_ll_).
+
+
+ Intl.supportedValuesOf ( _key_ )
+
+
+ When the `supportedValuesOf` method is called with argument _key_ , the following steps are taken:
+
+
+
+ 1. Let _key_ be ? ToString(_key_).
+ 1. If _key_ is *"calendar"*, then
+ 1. Let _list_ be AvailableCanonicalCalendars( ).
+ 1. Else if _key_ is *"collation"*, then
+ 1. Let _list_ be AvailableCanonicalCollations( ).
+ 1. Else if _key_ is *"currency"*, then
+ 1. Let _list_ be AvailableCanonicalCurrencies( ).
+ 1. Else if _key_ is *"numberingSystem"*, then
+ 1. Let _list_ be AvailableCanonicalNumberingSystems( ).
+ 1. Else if _key_ is *"timeZone"*, then
+ 1. Let _list_ be AvailableCanonicalTimeZones( ).
+ 1. Else if _key_ is *"unit"*, then
+ 1. Let _list_ be AvailableCanonicalUnits( ).
+ 1. Else,
+ 1. Throw a *RangeError* exception.
+ 1. Return CreateArrayFromList( _list_ ).
+
+
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 2d055476..06a10deb 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -1,8 +1,8 @@
- Identification of Locales, Currencies, Time Zones, and Measurement Units
+ Identification of Locales, Currencies, Time Zones, Measurement Units, Numbering Systems, Collations, and Calendars
- This clause describes the String values used in the ECMAScript 2023 Internationalization API Specification to identify locales, currencies, time zones, and measurement units.
+ This clause describes the String values used in the ECMAScript 2023 Internationalization API Specification to identify locales, currencies, time zones, measurement units, numbering systems, collations, and calendars.
@@ -159,6 +159,15 @@ IsWellFormedCurrencyCode ( _currency_ )
+
+ AvailableCanonicalCurrencies (
+ ): a List of Strings
+
+
+
Time Zone Names
@@ -213,6 +222,29 @@ DefaultTimeZone ( )
The DefaultTimeZone abstract operation returns a String value representing the valid () and canonicalized () time zone name for the host environment's current time zone.
+
+
+
+ AvailableCanonicalTimeZones (
+ ): a List of Strings
+
+
+
+
+ 1. Let _names_ be a List of all supported Zone and Link names in the IANA Time Zone Database.
+ 1. Let _result_ be a new empty List.
+ 1. For each element _name_ of _names_, do
+ 1. Assert: ! IsValidTimeZoneName( _name_ ) is *true*.
+ 1. Let _canonical_ be ! CanonicalizeTimeZoneName( _name_ ).
+ 1. If _result_ does not contain an element equal to _canonical_, then
+ 1. Append _canonical_ to the end of _result_.
+ 1. Sort _result_ in order as if an Array of the same values had been sorted using %Array.prototype.sort% using *undefined* as _comparefn_.
+ 1. Return _result_.
+
+
@@ -315,5 +347,64 @@ IsSanctionedSingleUnitIdentifier ( _unitIdentifier_ )
+
+ AvailableCanonicalUnits (
+ ): a List of Strings
+
+
+
+
+
+ Numbering System Identifiers
+
+
+ The ECMAScript 2023 Internationalization API Specification identifies numbering systems using a numbering system identifier as defined by Unicode Technical Standard #35, Part 3, Section 1. Their canonical form is a string containing all lowercase letters.
+
+
+
+ AvailableCanonicalNumberingSystems (
+ ): a List of Strings
+
+
+
+
+
+ Collation Types
+
+
+ The ECMAScript 2023 Internationalization API Specification identifies collations using a collation type as defined by Unicode Technical Standard #35, Part 5, Section 3.1. Their canonical form is a string containing all lowercase letters with zero or more hyphens.
+
+
+
+ AvailableCanonicalCollations (
+ ): a List of Strings
+
+
+
+
+
+ Calendar Types
+
+
+ The ECMAScript 2023 Internationalization API Specification identifies calendars using a calendar type as defined by Unicode Technical Standard #35, Part 4, Section 2. Their canonical form is a string containing all lower case letters with zero or more hyphens.
+
+
+
+ AvailableCanonicalCalendars (
+ ): a List of Strings
+
+
From 426ed94407a218e762a0ff3e4861b46eb0e41454 Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Tue, 29 Nov 2022 11:34:53 -0800
Subject: [PATCH 02/10] sync w/ intl-enumeration pull/43
https://github.com/tc39/proposal-intl-enumeration/pull/43
---
spec/locales-currencies-tz.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 06a10deb..78409d8e 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -369,7 +369,7 @@ AvailableCanonicalNumberingSystems (
): a List of Strings
@@ -386,7 +386,7 @@ AvailableCanonicalCollations (
): a List of Strings
@@ -403,7 +403,7 @@ AvailableCanonicalCalendars (
): a List of Strings
From 6208ca9f7f13bf59e2386e274b77744fda590ba5 Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Mon, 30 Jan 2023 09:22:48 -0800
Subject: [PATCH 03/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 78409d8e..1672c5b0 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -234,7 +234,7 @@
- 1. Let _names_ be a List of all supported Zone and Link names in the IANA Time Zone Database.
+ 1. Let _names_ be a List of all Zone and Link names in the IANA Time Zone Database that are supported by the implementation.
1. Let _result_ be a new empty List.
1. For each element _name_ of _names_, do
1. Assert: ! IsValidTimeZoneName( _name_ ) is *true*.
From 2b2dee945d70f0833b1780e31e8e8984a6acdea1 Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Mon, 30 Jan 2023 09:23:16 -0800
Subject: [PATCH 04/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 1672c5b0..1330819f 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -239,7 +239,7 @@
1. For each element _name_ of _names_, do
1. Assert: ! IsValidTimeZoneName( _name_ ) is *true*.
1. Let _canonical_ be ! CanonicalizeTimeZoneName( _name_ ).
- 1. If _result_ does not contain an element equal to _canonical_, then
+ 1. If _result_ does not contain _canonical_, then
1. Append _canonical_ to the end of _result_.
1. Sort _result_ in order as if an Array of the same values had been sorted using %Array.prototype.sort% using *undefined* as _comparefn_.
1. Return _result_.
From 4aec26bf32be36a4ece9ab28f9c2c04bbf74ef8a Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Mon, 30 Jan 2023 09:24:11 -0800
Subject: [PATCH 05/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 1330819f..5909682a 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -361,7 +361,7 @@ AvailableCanonicalUnits (
Numbering System Identifiers
- The ECMAScript 2023 Internationalization API Specification identifies numbering systems using a numbering system identifier as defined by Unicode Technical Standard #35, Part 3, Section 1. Their canonical form is a string containing all lowercase letters.
+ This specification identifies numbering systems using a numbering system identifier corresponding with the name referenced by Unicode Technical Standard #35 Part 3 Numbers, Section 1 Numbering Systems. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z).
From b6538a1ae042e74570fa310fe51074fc566dbb2c Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Mon, 30 Jan 2023 09:25:11 -0800
Subject: [PATCH 06/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 5909682a..49254e19 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -378,7 +378,7 @@ AvailableCanonicalNumberingSystems (
Collation Types
- The ECMAScript 2023 Internationalization API Specification identifies collations using a collation type as defined by Unicode Technical Standard #35, Part 5, Section 3.1. Their canonical form is a string containing all lowercase letters with zero or more hyphens.
+ This specification identifies collations using a collation type as defined by Unicode Technical Standard #35 Part 5 Collation, Section 3.1 Collation Types. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
From a6034845f2ae02d10acfb450c6b4b3bd601cf89c Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Mon, 30 Jan 2023 09:25:32 -0800
Subject: [PATCH 07/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 49254e19..567275c6 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -395,7 +395,7 @@ AvailableCanonicalCollations (
Calendar Types
- The ECMAScript 2023 Internationalization API Specification identifies calendars using a calendar type as defined by Unicode Technical Standard #35, Part 4, Section 2. Their canonical form is a string containing all lower case letters with zero or more hyphens.
+ The ECMAScript 2023 Internationalization API Specification identifies calendars using a calendar type as defined by Unicode Technical Standard #35 Part 4 Dates, Section 2 Calendar Elements. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
From e04f88ce8ecf3f27b17d9f1f342ddf3fddbf946c Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Thu, 9 Feb 2023 10:43:27 -0800
Subject: [PATCH 08/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 567275c6..602124fe 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -2,7 +2,7 @@
Identification of Locales, Currencies, Time Zones, Measurement Units, Numbering Systems, Collations, and Calendars
- This clause describes the String values used in the ECMAScript 2023 Internationalization API Specification to identify locales, currencies, time zones, measurement units, numbering systems, collations, and calendars.
+ This clause describes the String values used in this specification to identify locales, currencies, time zones, measurement units, numbering systems, collations, and calendars.
From 897ad9cb827e687aa7e336497cbc6ab288ddba12 Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Thu, 9 Feb 2023 10:43:39 -0800
Subject: [PATCH 09/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 602124fe..580c8502 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -395,7 +395,7 @@ AvailableCanonicalCollations (
Calendar Types
- The ECMAScript 2023 Internationalization API Specification identifies calendars using a calendar type as defined by Unicode Technical Standard #35 Part 4 Dates, Section 2 Calendar Elements. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
+ This specification identifies calendars using a calendar type as defined by Unicode Technical Standard #35 Part 4 Dates, Section 2 Calendar Elements. Their canonical form is a string containing only Unicode Basic Latin lowercase letters (U+0061 LATIN SMALL LETTER A through U+007A LATIN SMALL LETTER Z) with zero or more medial hyphens (U+002D HYPHEN-MINUS).
From 086d81dcd2e25c5a78506c65e486fbf608e92161 Mon Sep 17 00:00:00 2001
From: Frank Yung-Fong Tang
Date: Tue, 21 Mar 2023 17:16:41 -0700
Subject: [PATCH 10/10] Update spec/locales-currencies-tz.html
Co-authored-by: Richard Gibson
---
spec/locales-currencies-tz.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html
index 580c8502..6807d384 100644
--- a/spec/locales-currencies-tz.html
+++ b/spec/locales-currencies-tz.html
@@ -241,7 +241,7 @@
1. Let _canonical_ be ! CanonicalizeTimeZoneName( _name_ ).
1. If _result_ does not contain _canonical_, then
1. Append _canonical_ to the end of _result_.
- 1. Sort _result_ in order as if an Array of the same values had been sorted using %Array.prototype.sort% using *undefined* as _comparefn_.
+ 1. [declared="comparefn"] Sort _result_ in order as if an Array of the same values had been sorted using %Array.prototype.sort% using *undefined* as _comparefn_.
1. Return _result_.