mirror of
https://github.com/tc39/test262.git
synced 2025-08-14 14:38:27 +02:00
25 lines
594 B
JavaScript
25 lines
594 B
JavaScript
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-temporal.zoneddatetime
|
|
description: IANA legacy names must be supported
|
|
features: [Temporal, canonical-tz]
|
|
---*/
|
|
|
|
const legacyNames = [
|
|
"Etc/GMT0",
|
|
"GMT0",
|
|
"GMT-0",
|
|
"GMT+0",
|
|
"EST5EDT",
|
|
"CST6CDT",
|
|
"MST7MDT",
|
|
"PST8PDT"
|
|
];
|
|
|
|
legacyNames.forEach((arg) => {
|
|
const instance = new Temporal.ZonedDateTime(0n, arg);
|
|
assert.sameValue(instance.timeZoneId, arg, `"${arg}" does not match "${instance.timeZoneId}" time zone identifier`);
|
|
});
|