basic-hebrew.js (902B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2025 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.plainyearmonth.from 7 description: Basic functionality of resolving fields in hebrew calendar 8 features: [Temporal, Intl.Era-monthcode] 9 includes: [temporalHelpers.js] 10 ---*/ 11 12 const calendar = "hebrew"; 13 const options = { overflow: "reject" }; 14 15 const commonYear = 5783; 16 17 for (let month = 1; month < 13; month++) { 18 const monthCode = `M${String(month).padStart(2, '0')}`; 19 20 const startOfMonth = Temporal.PlainYearMonth.from({ year: commonYear, month, calendar }, options); 21 TemporalHelpers.assertPlainYearMonth( 22 startOfMonth, 23 commonYear, month, monthCode, 24 `${monthCode} in common year`, 25 "am", commonYear, null 26 ); 27 } 28 29 reportCompare(0, 0);