Source code

Revision control

Copy as Markdown

Other Tools

// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// Copyright (C) 2026 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plainmonthday.from
description: Not-yet-adopted calendar IDs are rejected
includes: [temporalHelpers.js]
features: [Intl.Era-monthcode, Temporal]
---*/
for (const calendar of TemporalHelpers.NotYetSupportedCalendars) {
assert.throws(RangeError, function () {
Temporal.PlainMonthDay.from(`1970-01-01[u-ca=${calendar}]`);
}, `${calendar} is not yet supported (string)`);
assert.throws(RangeError, function () {
Temporal.PlainMonthDay.from({ monthCode: "M01", day: 1, calendar });
}, `${calendar} is not yet supported (property bag)`);
}
reportCompare(0, 0);