mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibJS: Consistently call observable Temporal AOs with undefined options
This is a normative change in the Temporal spec.
See: 6fa5b9d
This commit is contained in:
parent
85327e6b5d
commit
151eb8606d
21 changed files with 226 additions and 261 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021-2022, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -83,13 +83,13 @@ JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimeConstructor::from)
|
|||
auto& item_object = static_cast<ZonedDateTime&>(item.as_object());
|
||||
|
||||
// a. Perform ? ToTemporalOverflow(options).
|
||||
(void)TRY(to_temporal_overflow(global_object, *options));
|
||||
(void)TRY(to_temporal_overflow(global_object, options));
|
||||
|
||||
// b. Perform ? ToTemporalDisambiguation(options).
|
||||
(void)TRY(to_temporal_disambiguation(global_object, *options));
|
||||
(void)TRY(to_temporal_disambiguation(global_object, options));
|
||||
|
||||
// c. Perform ? ToTemporalOffset(options, "reject").
|
||||
(void)TRY(to_temporal_offset(global_object, *options, "reject"));
|
||||
(void)TRY(to_temporal_offset(global_object, options, "reject"));
|
||||
|
||||
// d. Return ! CreateTemporalZonedDateTime(item.[[Nanoseconds]], item.[[TimeZone]], item.[[Calendar]]).
|
||||
return MUST(create_temporal_zoned_date_time(global_object, item_object.nanoseconds(), item_object.time_zone(), item_object.calendar()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue