mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
22 lines
853 B
JavaScript
22 lines
853 B
JavaScript
// Copyright (C) 2021 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-temporal.plaindate.from
|
|
description: With year/month/day
|
|
info: |
|
|
1. Let calendar be the this value.
|
|
2. Perform ? RequireInternalSlot(calendar, [[InitializedTemporalCalendar]]).
|
|
3. Assert: calendar.[[Identifier]] is "iso8601".
|
|
4. If Type(fields) is not Object, throw a TypeError exception.
|
|
5. Set options to ? GetOptionsObject(options).
|
|
6. Let result be ? ISODateFromFields(fields, options).
|
|
7. Return ? CreateTemporalDate(result.[[Year]], result.[[Month]], result.[[Day]], calendar).
|
|
features: [Temporal]
|
|
includes: [temporalHelpers.js]
|
|
---*/
|
|
|
|
TemporalHelpers.assertPlainDate(
|
|
Temporal.PlainDate.from({year: 2021, month: 7, day: 15}),
|
|
2021, 7, "M07", 15,
|
|
"year/month/day");
|