tor-browser

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

argument-plaindate.js (807B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2022 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: A PlainYearMonth argument is cloned
      8 includes: [temporalHelpers.js]
      9 features: [Temporal]
     10 ---*/
     11 
     12 const plainDate = Temporal.PlainDate.from("1976-11-18");
     13 const plainYearMonth = Temporal.PlainYearMonth.from(plainDate);
     14 TemporalHelpers.assertPlainYearMonth(plainYearMonth, 1976, 11, "M11");
     15 assert.sameValue(plainYearMonth.calendarId, "iso8601", "calendar string should be iso8601");
     16 assert.sameValue(plainYearMonth.toString({ calendarName: "always" }), "1976-11-01[u-ca=iso8601]", "iso reference date");
     17 
     18 reportCompare(0, 0);