test262/test/intl402/Temporal/PlainMonthDay/from/calendar-not-supporting-eras.js
Manish Goregaokar baa48a416c
Fix up calendar tests that rely on eras (#4558)
* Fix up calendar tests that rely on eras

* remove islamic
2025-08-18 17:55:59 -07:00

31 lines
891 B
JavaScript

// 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.plainmonthday.from
description: era and eraYear are ignored (for calendars not using eras)
includes: [temporalHelpers.js]
features: [Temporal]
---*/
const result = Temporal.PlainMonthDay.from({
era: "foobar",
eraYear: 1,
monthCode: "M01",
day: 1,
calendar: "iso8601",
});
TemporalHelpers.assertPlainMonthDay(result, "M01", 1,
"era and eraYear are ignored for calendar not using eras (iso8601)");
const resultChinese = Temporal.PlainMonthDay.from({
era: "foobar",
eraYear: 1,
monthCode: "M01",
day: 1,
calendar: "chinese",
});
TemporalHelpers.assertPlainMonthDay(resultChinese, "M01", 1,
"era and eraYear are ignored for calendar not using eras (Chinese)");
assert.sameValue(resultChinese.calendarId, "chinese");