tor-browser

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

with-year-month-day.js (973B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2021 the V8 project authors. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-temporal.plaindate.from
      6 description: With year/month/day
      7 info: |
      8  1. Let calendar be the this value.
      9  2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
     10  3. Assert: calendar.[[Identifier]] is "iso8601".
     11  4. If Type(fields) is not Object, throw a TypeError exception.
     12  5. Set options to ? GetOptionsObject(options).
     13  6. Let result be ? ISODateFromFields(fields, options).
     14  7. Return ? CreateTemporalDate(result.[[Year]], result.[[Month]], result.[[Day]], calendar).
     15 features: [Temporal]
     16 includes: [temporalHelpers.js]
     17 ---*/
     18 
     19 TemporalHelpers.assertPlainDate(
     20    Temporal.PlainDate.from({year: 2021, month: 7, day: 15}),
     21    2021, 7, "M07", 15,
     22    "year/month/day");
     23 
     24 reportCompare(0, 0);