one-of-era-erayear-undefined.js (721B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2023 Igalia, S.L. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-temporal.plainmonthday.from 7 description: Does not throw a RangeError if only one of era/eraYear fields is present 8 features: [Temporal] 9 includes: [temporalHelpers.js] 10 ---*/ 11 12 const base = { year: 2000, month: 5, day: 2, era: 'ce' }; 13 TemporalHelpers.assertPlainMonthDay(Temporal.PlainMonthDay.from(base), 'M05', 2); 14 15 const base2 = { year: 2000, month: 5, day: 2, eraYear: 1 }; 16 TemporalHelpers.assertPlainMonthDay(Temporal.PlainMonthDay.from(base2), 'M05', 2); 17 18 reportCompare(0, 0);