Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-temporal.plaindate.prototype.since
description: Subtracting a date in a leap year from a date in a common year should work
includes: [temporalHelpers.js]
features: [Temporal]
---*/

const calendar = 'chinese';
const a = new Temporal.PlainDate(2016, 7, 31, calendar);
const b = new Temporal.PlainDate(2017, 7, 31, calendar);
TemporalHelpers.assertDuration(b.since(a, { largestUnit: 'years' }),
0, 12, 0, 11, 0, 0, 0, 0, 0, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-temporal.plaindate.prototype.until
description: Subtracting a date in a leap year from a date in a common year should work
includes: [temporalHelpers.js]
features: [Temporal]
---*/

const calendar = 'hebrew';
const a = new Temporal.PlainDate(1967, 2, 28, calendar);
const b = new Temporal.PlainDate(1968, 3, 1, calendar);
TemporalHelpers.assertDuration(a.until(b, { largestUnit: 'years' }),
0, 12, 0, 13, 0, 0, 0, 0, 0, 0);