diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-18 13:38:48 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-18 13:38:48 +0200 |
commit | f90d98aef0dfaaa4f6bc573091ff1333c7816e98 (patch) | |
tree | ed16fc6e239000ded129363dc541c52cc9ca7f81 /Userland/Libraries/LibJS | |
parent | 99f9667e5d18a16a03f6b9c667889e66873753de (diff) | |
download | serenity-f90d98aef0dfaaa4f6bc573091ff1333c7816e98.zip |
LibJS: Update step order in the InterpretTemporalDateTimeFields AO
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/be88667
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp index d102957a21..03fe6e3cc4 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTime.cpp @@ -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)); |