Skip to content

Commit c472ab5

Browse files
committed
fixup! Test Temporal.TimeZone ID case normalization
1 parent 6b641c2 commit c472ab5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/intl402/Temporal/TimeZone/from/timezone-case-insensitive.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ features: [Temporal, time-zone-canonicalization]
88
---*/
99

1010
const timeZoneIdentifiers = [
11+
// IANA TZDB Zone names
1112
'Africa/Abidjan',
1213
'Africa/Algiers',
1314
'Africa/Bissau',
@@ -58,7 +59,7 @@ const timeZoneIdentifiers = [
5859
'America/Cayenne',
5960
'America/Chicago',
6061
'America/Chihuahua',
61-
// 'America/Ciudad_Juarez',
62+
// 'America/Ciudad_Juarez' // uncomment after Node supports this ID added in TZDB 2022g
6263
'America/Costa_Rica',
6364
'America/Cuiaba',
6465
'America/Danmarkshavn',
@@ -358,6 +359,8 @@ const timeZoneIdentifiers = [
358359
'Pacific/Tahiti',
359360
'Pacific/Tarawa',
360361
'Pacific/Tongatapu',
362+
363+
// IANA TZDB Link names
361364
'WET',
362365
'Africa/Accra',
363366
'Africa/Addis_Ababa',
@@ -607,6 +610,11 @@ const timeZoneIdentifiers = [
607610
'Zulu'
608611
];
609612

613+
// We want to test all available named time zone identifiers (both primary and non-primary),
614+
// but no ECMAScript built-in API exposes that list. So we use a union of two sources:
615+
// 1. A hard-coded list of Zone and Link identifiers from the 2022g version of IANA TZDB.
616+
// 2. Canonical IDs exposed by Intl.supportedValuesOf('timeZone'), which ensures that IDs
617+
// added to TZDB later than 2022g will be tested. (New IDs are almost always added as primary.)
610618
const ids = [...new Set([...timeZoneIdentifiers, ...Intl.supportedValuesOf('timeZone')])];
611619
for (const id of ids) {
612620
const lower = id.toLowerCase();

0 commit comments

Comments
 (0)