1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2024 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 esid: sec-temporal.plaindatetime.prototype.until
8 RangeError when inconsistent custom calendar method causes mixed signs of
13 // Test case provided by André Bargull
15 const cal = new (class extends Temporal.Calendar {
16 dateAdd(date, duration, options) {
17 return super.dateAdd(date, duration.negated(), options);
21 const one = new Temporal.PlainDateTime(2000, 1, 1, 0, 0, 0, 0, 0, 0, cal);
22 const two = new Temporal.PlainDateTime(2020, 5, 10, 12, 12, 0, 0, 0, 0, cal);
24 assert.throws(RangeError, () => one.until(two, {