2022-01-24 12:15:04 +01:00
|
|
|
// 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.now.zoneddatetime
|
|
|
|
description: String calendar argument
|
|
|
|
features: [Temporal]
|
|
|
|
---*/
|
|
|
|
|
|
|
|
const zdt = Temporal.Now.zonedDateTime("gregory");
|
2023-01-06 03:04:58 +01:00
|
|
|
const tz = Temporal.Now.timeZoneId();
|
2022-01-24 12:15:04 +01:00
|
|
|
assert(zdt instanceof Temporal.ZonedDateTime);
|
2023-02-17 21:33:18 +01:00
|
|
|
assert.sameValue(typeof zdt.getISOFields().calendar, "string", "calendar slot should store a string");
|
2023-02-17 21:28:55 +01:00
|
|
|
assert.sameValue(zdt.calendarId, "gregory");
|
2023-02-17 22:06:20 +01:00
|
|
|
assert.sameValue(typeof zdt.getISOFields().timeZone, "string", "time zone slot should store a string");
|
2023-02-17 22:05:30 +01:00
|
|
|
assert.sameValue(zdt.timeZoneId, tz);
|