| 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 |
"Europe/Jersey", // Link Europe/London Europe/Jersey |
| 13 |
"Europe/Guernsey", // Link Europe/London Europe/Guernsey |
| 14 |
"Europe/Isle_of_Man", // Link Europe/London Europe/Isle_of_Man |
| 15 |
"Europe/Mariehamn", // Link Europe/Helsinki Europe/Mariehamn |
| 16 |
"Europe/Busingen", // Link Europe/Zurich Europe/Busingen |
| 17 |
"Europe/Vatican", // Link Europe/Rome Europe/Vatican |
| 18 |
"Europe/San_Marino", // Link Europe/Rome Europe/San_Marino |
| 19 |
"Europe/Vaduz", // Link Europe/Zurich Europe/Vaduz |
| 20 |
"Arctic/Longyearbyen", // Link Europe/Oslo Arctic/Longyearbyen |
| 21 |
"Europe/Ljubljana", // Link Europe/Belgrade Europe/Ljubljana # Slovenia |
| 22 |
"Europe/Podgorica", // Link Europe/Belgrade Europe/Podgorica # Montenegro |
| 23 |
"Europe/Sarajevo", // Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina |
| 24 |
"Europe/Skopje", // Link Europe/Belgrade Europe/Skopje # North Macedonia |
| 25 |
"Europe/Zagreb", // Link Europe/Belgrade Europe/Zagreb # Croatia |
| 26 |
"Europe/Bratislava", // Link Europe/Prague Europe/Bratislava |
| 27 |
"Asia/Istanbul", // Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents. |
| 28 |
]; |
| 29 |
|
| 30 |
for (let id of testCases) { |
| 31 |
const instance = new Temporal.ZonedDateTime(0n, id); |
| 32 |
assert.sameValue(instance.timeZoneId, id); |
| 33 |
} |
| 34 |
|
| 35 |
reportCompare(0, 0); |