summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/Temporal/Now/zonedDateTime/calendar-timezone-string.js
blob: a97baba9b771dbd00c3d84d64e4ac7ce87162b15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// 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 and time zone arguments
features: [Temporal]
---*/

const zdt = Temporal.Now.zonedDateTime("gregory", "America/Los_Angeles");
assert(zdt instanceof Temporal.ZonedDateTime);
assert.sameValue(typeof zdt.getISOFields().calendar, "string", "calendar slot should store a string");
assert.sameValue(zdt.calendarId, "gregory");
assert.sameValue(typeof zdt.getISOFields().timeZone, "string", "time zone slot should store a string");
assert.sameValue(zdt.timeZoneId, "America/Los_Angeles");

reportCompare(0, 0);