blob: c491b7592b6ffb6b664efcf2dcbe3cde4d651c61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// |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.zoneddatetime.prototype.until
description: Conversion of ISO date-time strings to Temporal.TimeZone instances (with IANA time zones)
features: [Temporal]
---*/
const expectedTimeZone = "America/Vancouver";
const instance = new Temporal.ZonedDateTime(0n, expectedTimeZone);
let timeZone = "2021-08-19T17:30[America/Vancouver]";
instance.until({ year: 2020, month: 5, day: 2, timeZone });
timeZone = "2021-08-19T17:30Z[America/Vancouver]";
instance.until({ year: 2020, month: 5, day: 2, timeZone });
timeZone = "2021-08-19T17:30-07:00[America/Vancouver]";
instance.until({ year: 2020, month: 5, day: 2, timeZone });
reportCompare(0, 0);
|