Debian Codegraph @

js/src/tests/test262/intl402/Temporal/ZonedDateTime/links-etcetera.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 André Bargull. 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: ZonedDateTime constructor accepts link names as time zone ID input
8 features: [Temporal, canonical-tz]
9 ---*/
10
11 const testCases = [
12 "GMT", // Link Etc/GMT GMT
13 "Etc/Universal", // Link Etc/UTC Etc/Universal
14 "Etc/Zulu", // Link Etc/UTC Etc/Zulu
15 "Etc/Greenwich", // Link Etc/GMT Etc/Greenwich
16 "Etc/GMT-0", // Link Etc/GMT Etc/GMT-0
17 "Etc/GMT+0", // Link Etc/GMT Etc/GMT+0
18 "Etc/GMT0", // Link Etc/GMT Etc/GMT0
19 ];
20
21 for (let id of testCases) {
22 const instance = new Temporal.ZonedDateTime(0n, id);
23 assert.sameValue(instance.timeZoneId, id);
24 }
25
26 reportCompare(0, 0);