Skip to content

Commit

Permalink
LibJS: Update step order in the InterpretTemporalDateTimeFields AO
Browse files Browse the repository at this point in the history
This is a normative change in the Temporal spec.

See: tc39/proposal-temporal@be88667
  • Loading branch information
linusg committed Sep 18, 2021
1 parent 99f9667 commit f90d98a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ ThrowCompletionOr<ISODateTime> interpret_temporal_date_time_fields(GlobalObject&
// 1. Let timeResult be ? ToTemporalTimeRecord(fields).
auto unregulated_time_result = TRY(to_temporal_time_record(global_object, fields));

// 2. Let temporalDate be ? DateFromFields(calendar, fields, options).
auto* temporal_date = TRY(date_from_fields(global_object, calendar, fields, options));

// 3. Let overflow be ? ToTemporalOverflow(options).
// 2. Let overflow be ? ToTemporalOverflow(options).
auto overflow = TRY(to_temporal_overflow(global_object, options));

// 3. Let temporalDate be ? DateFromFields(calendar, fields, options).
auto* temporal_date = TRY(date_from_fields(global_object, calendar, fields, options));

// 4. Let timeResult be ? RegulateTime(timeResult.[[Hour]], timeResult.[[Minute]], timeResult.[[Second]], timeResult.[[Millisecond]], timeResult.[[Microsecond]], timeResult.[[Nanosecond]], overflow).
auto time_result = TRY(regulate_time(global_object, unregulated_time_result.hour, unregulated_time_result.minute, unregulated_time_result.second, unregulated_time_result.millisecond, unregulated_time_result.microsecond, unregulated_time_result.nanosecond, overflow));

Expand Down

0 comments on commit f90d98a

Please sign in to comment.