2022-09-07 10:30:00 +02:00
|
|
|
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2022-09-13 20:21:30 +02:00
|
|
|
esid: sec-temporal.plainyearmonth.from
|
2022-09-07 10:30:00 +02:00
|
|
|
description: The calendar name is case-insensitive
|
|
|
|
includes: [temporalHelpers.js]
|
|
|
|
features: [Temporal]
|
|
|
|
---*/
|
|
|
|
|
2024-07-03 03:00:28 +02:00
|
|
|
const arg = { year: 2019, monthCode: "M06", calendar: "IsO8601" };
|
2023-01-19 03:01:05 +01:00
|
|
|
const result = Temporal.PlainYearMonth.from(arg);
|
|
|
|
TemporalHelpers.assertPlainYearMonth(result, 2019, 6, "M06", "Calendar is case-insensitive");
|
2024-07-03 03:00:28 +02:00
|
|
|
|
|
|
|
arg.calendar = "\u0130SO8601";
|
|
|
|
assert.throws(
|
|
|
|
RangeError,
|
|
|
|
() => Temporal.PlainYearMonth.from(arg),
|
|
|
|
"calendar ID is capital dotted I is not lowercased"
|
|
|
|
);
|