Debian Codegraph @

js/src/tests/test262/intl402/Temporal/ZonedDateTime/iana-legacy-names.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.zoneddatetime
7 description: IANA legacy names must be supported
8 features: [Temporal, canonical-tz]
9 ---*/
10
11 const legacyNames = [
12 "Etc/GMT0",
13 "GMT0",
14 "GMT-0",
15 "GMT+0",
16 "EST5EDT",
17 "CST6CDT",
18 "MST7MDT",
19 "PST8PDT"
20 ];
21
22 legacyNames.forEach((arg) => {
23 const instance = new Temporal.ZonedDateTime(0n, arg);
24 assert.sameValue(instance.timeZoneId, arg, `"${arg}" does not match "${instance.timeZoneId}" time zone identifier`);
25 });
26
27 reportCompare(0, 0);