|
@@ -758,12 +758,12 @@ ThrowCompletionOr<ISODateRecord> iso_date_from_fields(VM& vm, Object const& fiel
|
|
{
|
|
{
|
|
// 1. Assert: Type(fields) is Object.
|
|
// 1. Assert: Type(fields) is Object.
|
|
|
|
|
|
- // 2. Let overflow be ? ToTemporalOverflow(options).
|
|
|
|
- auto overflow = TRY(to_temporal_overflow(vm, &options));
|
|
|
|
-
|
|
|
|
- // 3. Set fields to ? PrepareTemporalFields(fields, « "day", "month", "monthCode", "year" », « "year", "day" »).
|
|
|
|
|
|
+ // 2. Set fields to ? PrepareTemporalFields(fields, « "day", "month", "monthCode", "year" », « "year", "day" »).
|
|
auto* prepared_fields = TRY(prepare_temporal_fields(vm, fields, { "day", "month", "monthCode", "year" }, Vector<StringView> { "year"sv, "day"sv }));
|
|
auto* prepared_fields = TRY(prepare_temporal_fields(vm, fields, { "day", "month", "monthCode", "year" }, Vector<StringView> { "year"sv, "day"sv }));
|
|
|
|
|
|
|
|
+ // 3. Let overflow be ? ToTemporalOverflow(options).
|
|
|
|
+ auto overflow = TRY(to_temporal_overflow(vm, &options));
|
|
|
|
+
|
|
// 4. Let year be ! Get(fields, "year").
|
|
// 4. Let year be ! Get(fields, "year").
|
|
auto year = MUST(prepared_fields->get(vm.names.year));
|
|
auto year = MUST(prepared_fields->get(vm.names.year));
|
|
|
|
|
|
@@ -788,12 +788,12 @@ ThrowCompletionOr<ISOYearMonth> iso_year_month_from_fields(VM& vm, Object const&
|
|
{
|
|
{
|
|
// 1. Assert: Type(fields) is Object.
|
|
// 1. Assert: Type(fields) is Object.
|
|
|
|
|
|
- // 2. Let overflow be ? ToTemporalOverflow(options).
|
|
|
|
- auto overflow = TRY(to_temporal_overflow(vm, &options));
|
|
|
|
-
|
|
|
|
- // 3. Set fields to ? PrepareTemporalFields(fields, « "month", "monthCode", "year" », « "year" »).
|
|
|
|
|
|
+ // 2. Set fields to ? PrepareTemporalFields(fields, « "month", "monthCode", "year" », « "year" »).
|
|
auto* prepared_fields = TRY(prepare_temporal_fields(vm, fields, { "month"sv, "monthCode"sv, "year"sv }, Vector<StringView> { "year"sv }));
|
|
auto* prepared_fields = TRY(prepare_temporal_fields(vm, fields, { "month"sv, "monthCode"sv, "year"sv }, Vector<StringView> { "year"sv }));
|
|
|
|
|
|
|
|
+ // 3. Let overflow be ? ToTemporalOverflow(options).
|
|
|
|
+ auto overflow = TRY(to_temporal_overflow(vm, &options));
|
|
|
|
+
|
|
// 4. Let year be ! Get(fields, "year").
|
|
// 4. Let year be ! Get(fields, "year").
|
|
auto year = MUST(prepared_fields->get(vm.names.year));
|
|
auto year = MUST(prepared_fields->get(vm.names.year));
|
|
|
|
|
|
@@ -815,12 +815,12 @@ ThrowCompletionOr<ISOMonthDay> iso_month_day_from_fields(VM& vm, Object const& f
|
|
{
|
|
{
|
|
// 1. Assert: Type(fields) is Object.
|
|
// 1. Assert: Type(fields) is Object.
|
|
|
|
|
|
- // 2. Let overflow be ? ToTemporalOverflow(options).
|
|
|
|
- auto overflow = TRY(to_temporal_overflow(vm, &options));
|
|
|
|
-
|
|
|
|
- // 3. Set fields to ? PrepareTemporalFields(fields, « "day", "month", "monthCode", "year" », « "day" »).
|
|
|
|
|
|
+ // 2. Set fields to ? PrepareTemporalFields(fields, « "day", "month", "monthCode", "year" », « "day" »).
|
|
auto* prepared_fields = TRY(prepare_temporal_fields(vm, fields, { "day"sv, "month"sv, "monthCode"sv, "year"sv }, Vector<StringView> { "day"sv }));
|
|
auto* prepared_fields = TRY(prepare_temporal_fields(vm, fields, { "day"sv, "month"sv, "monthCode"sv, "year"sv }, Vector<StringView> { "day"sv }));
|
|
|
|
|
|
|
|
+ // 3. Let overflow be ? ToTemporalOverflow(options).
|
|
|
|
+ auto overflow = TRY(to_temporal_overflow(vm, &options));
|
|
|
|
+
|
|
// 4. Let month be ! Get(fields, "month").
|
|
// 4. Let month be ! Get(fields, "month").
|
|
auto month_value = MUST(prepared_fields->get(vm.names.month));
|
|
auto month_value = MUST(prepared_fields->get(vm.names.month));
|
|
|
|
|