1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 esid: sec-temporal.plainmonthday.protoype.tostring
7 description: Type conversions for calendarName option
9 sec-getoption step 9.a:
10 a. Set _value_ to ? ToString(_value_).
11 sec-temporal-toshowcalendaroption step 1:
12 1. Return ? GetOption(_normalizedOptions_, *"calendarName"*, « *"string"* », « *"auto"*, *"always"*, *"never"*, *"critical"* », *"auto"*).
13 sec-temporal.plainmonthday.protoype.tostring step 4:
14 4. Let _showCalendar_ be ? ToShowCalendarOption(_options_).
15 includes: [compareArray.js, temporalHelpers.js]
35 monthDayFromFields() {},
39 yearMonthFromFields() {},
42 const monthday = new Temporal.PlainMonthDay(5, 2, calendar);
44 TemporalHelpers.checkStringOptionWrongType("calendarName", "auto",
45 (calendarName) => monthday.toString({ calendarName }),
46 (result, descr) => assert.sameValue(result, "1972-05-02[u-ca=custom]", descr),