1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 esid: sec-temporal.zoneddatetime.prototype.equals
7 description: RangeError thrown if time zone reports an offset that is out of range
9 includes: [temporalHelpers.js]
12 [-86400_000_000_000, 86400_000_000_000].forEach((wrongOffset) => {
13 const timeZone = TemporalHelpers.specificOffsetTimeZone(wrongOffset);
14 const datetime = new Temporal.ZonedDateTime(1_000_000_000_987_654_321n, "UTC");
15 timeZone.getPossibleInstantsFor = function () {
18 assert.throws(RangeError, () => datetime.equals({ year: 2000, month: 5, day: 2, hour: 12, timeZone }));