From 2df6c7d29a18cd33120e791bdbe2043980a893fd Mon Sep 17 00:00:00 2001 From: Aditi Date: Wed, 19 Apr 2023 00:24:00 +0530 Subject: [PATCH] Added test for non-iso calendars for Temporal.PlainMonthDay.from --- .../from/reference-date-noniso-calendar.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/intl402/Temporal/PlainMonthDay/from/reference-date-noniso-calendar.js diff --git a/test/intl402/Temporal/PlainMonthDay/from/reference-date-noniso-calendar.js b/test/intl402/Temporal/PlainMonthDay/from/reference-date-noniso-calendar.js new file mode 100644 index 0000000000..e13691bb2b --- /dev/null +++ b/test/intl402/Temporal/PlainMonthDay/from/reference-date-noniso-calendar.js @@ -0,0 +1,17 @@ +// Copyright (C) 2023 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: Verify that the result of ToTemporalMonthDay preserves year information for Non-ISO calendars. +info: | + sec-temporal.plainmonthday.from step 3: + 3. Return ? ToTemporalMonthDay(_item_, _options_). + sec-temporal-totemporalmonthday step 11.: + 11. Set result to ? CreateTemporalMonthDay(_result_.[[Month]], _result_.[[Day]], _calendar_, _result_.[[Year]]). +includes: [temporalHelpers.js] +features: [Temporal] +---*/ + +const pmd = Temporal.PlainMonthDay.from("2023-01-01[u-ca=hebrew]") +TemporalHelpers.assertPlainMonthDay(pmd, "M04", 8); // 2023-01-01 corresponds to 8 Tevet in Hebrew Calendar.