tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

leap-months-hebrew.js (1351B)


      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: Test valid leap months when resolving fields in hebrew calendar
      8 features: [Temporal, Intl.Era-monthcode]
      9 includes: [temporalHelpers.js]
     10 ---*/
     11 
     12 const calendar = "hebrew";
     13 
     14 // Valid leap month: Adar I 5779
     15 TemporalHelpers.assertPlainYearMonth(
     16  Temporal.PlainYearMonth.from({ year: 5779, month: 6, calendar }),
     17  5779, 6, "M05L",
     18  "Leap month resolved from month number",
     19  "am", 5779, null);
     20 TemporalHelpers.assertPlainYearMonth(
     21  Temporal.PlainYearMonth.from({ year: 5779, monthCode: "M05L", calendar }),
     22  5779, 6, "M05L",
     23  "Leap month resolved from month code",
     24  "am", 5779, null);
     25 
     26 // Creating dates in later months in a leap year
     27 TemporalHelpers.assertPlainYearMonth(
     28  Temporal.PlainYearMonth.from({ year: 5779, month: 7, calendar }),
     29  5779, 7, "M06",
     30  "Month after leap month resolved from month number",
     31  "am", 5779, null);
     32 TemporalHelpers.assertPlainYearMonth(
     33  Temporal.PlainYearMonth.from({ year: 5779, monthCode: "M06", calendar }),
     34  5779, 7, "M06",
     35  "Month after leap month resolved from month code",
     36  "am", 5779, null);
     37 
     38 reportCompare(0, 0);