Temporal: Add test for setting minimum valid year-month with non-ISO8601 calendar (#2998) (#4300)

This commit is contained in:
Tim Chevalier 2024-11-01 11:14:22 -07:00 committed by GitHub
parent b7822bb0b8
commit 45f352d37b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,14 @@
// Copyright (C) 2024 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plainyearmonth.prototype.with
description: Can set the minimum valid year-month for non-ISO8601 calendars.
includes: [temporalHelpers.js]
features: [Temporal]
---*/
const apr2000 = new Temporal.PlainYearMonth(2000, 4, "gregory");
TemporalHelpers.assertPlainYearMonth(apr2000.with({year: -271821}),
-271821, 4, "M04", "", "gregory-inverse", 271822);