tor-browser

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

leap-months-hebrew.js (1326B)


      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.plaindate.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.assertPlainDate(
     16  Temporal.PlainDate.from({ year: 5779, month: 6, day: 1, calendar }),
     17  5779, 6, "M05L", 1,
     18  "Leap month resolved from month number",
     19  "am", 5779);
     20 TemporalHelpers.assertPlainDate(
     21  Temporal.PlainDate.from({ year: 5779, monthCode: "M05L", day: 1, calendar }),
     22  5779, 6, "M05L", 1,
     23  "Leap month resolved from month code",
     24  "am", 5779);
     25 
     26 // Creating dates in later months in a leap year
     27 TemporalHelpers.assertPlainDate(
     28  Temporal.PlainDate.from({ year: 5779, month: 7, day: 1, calendar }),
     29  5779, 7, "M06", 1,
     30  "Month after leap month resolved from month number",
     31  "am", 5779);
     32 TemporalHelpers.assertPlainDate(
     33  Temporal.PlainDate.from({ year: 5779, monthCode: "M06", day: 1, calendar }),
     34  5779, 7, "M06", 1,
     35  "Month after leap month resolved from month code",
     36  "am", 5779);
     37 
     38 reportCompare(0, 0);