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.plainmonthday.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 = { monthCode: "M11", day: 18, calendar: "IsO8601" };
|
2023-01-19 03:01:05 +01:00
|
|
|
const result = Temporal.PlainMonthDay.from(arg);
|
|
|
|
TemporalHelpers.assertPlainMonthDay(result, "M11", 18, "Calendar is case-insensitive");
|
2024-07-03 03:00:28 +02:00
|
|
|
|
|
|
|
arg.calendar = "\u0130SO8601";
|
|
|
|
assert.throws(
|
|
|
|
RangeError,
|
|
|
|
() => Temporal.PlainMonthDay.from(arg),
|
|
|
|
"calendar ID is capital dotted I is not lowercased"
|
|
|
|
);
|