blob: 1964e576c16f8a55ee7cb51cd7a01460d112f153 [file] [log] [blame]
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaindatetime.prototype.until
description: RangeError thrown if a string with UTC designator is used as a PlainDateTime
features: [Temporal, arrow-function]
---*/
const invalidStrings = [
"2019-10-01T09:00:00Z",
"2019-10-01T09:00:00Z[UTC]",
];
const instance = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 987, 654, 321);
invalidStrings.forEach((arg) => {
assert.throws(
RangeError,
() => instance.until(arg),
"String with UTC designator should not be valid as a PlainDateTime"
);
});