blob: 0db44c186970060f19def51c9edf3c2e56b79411 [file] [log] [blame]
// 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.timezone.prototype.getpossibleinstantsfor
description: Negative zero, as an extended year, is rejected
features: [Temporal, arrow-function]
---*/
const invalidStrings = [
"-000000-12-07",
"-000000-12-07T03:24:30",
"-000000-12-07T03:24:30+01:00",
"-000000-12-07T03:24:30+00:00[UTC]",
];
const instance = new Temporal.TimeZone("UTC");
invalidStrings.forEach((arg) => {
assert.throws(
RangeError,
() => instance.getPossibleInstantsFor(arg),
"reject minus zero as extended year"
);
});