tor-browser

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

refisoday-undefined.js (890B)


      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.
      4 
      5 /*---
      6 esid: sec-temporal.plainyearmonth
      7 description: referenceISODay argument defaults to 1 if not given
      8 features: [Temporal]
      9 ---*/
     10 
     11 const args = [2000, 5];
     12 
     13 const dateExplicit = new Temporal.PlainYearMonth(...args, undefined);
     14 const isoDayExplicit = Number(dateExplicit.toString({ calendarName: "always" }).split("-")[2].slice(0, 2));
     15 assert.sameValue(isoDayExplicit, 1, "default referenceISODay is 1");
     16 
     17 const dateImplicit = new Temporal.PlainYearMonth(...args);
     18 const isoDayImplicit = Number(dateImplicit.toString({ calendarName: "always" }).split("-")[2].slice(0, 2));
     19 assert.sameValue(isoDayImplicit, 1, "default referenceISODay is 1");
     20 
     21 reportCompare(0, 0);