diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp index 4e725e04f3..566bbde1f0 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp @@ -177,8 +177,8 @@ ThrowCompletionOr to_temporal_duration_record(GlobalObject& glob // 3. Let result be a new Duration Record with each field set to 0. auto result = DurationRecord {}; - // 4. Let partial be ? ToPartialDuration(temporalDurationLike). - auto partial = TRY(to_partial_duration(global_object, temporal_duration_like)); + // 4. Let partial be ? ToTemporalPartialDurationRecord(temporalDurationLike). + auto partial = TRY(to_temporal_partial_duration_record(global_object, temporal_duration_like)); auto duration_record_fields = temporal_duration_record_fields(vm); auto partial_duration_record_fields = temporal_duration_record_fields>(vm); @@ -295,8 +295,8 @@ StringView default_temporal_largest_unit(double years, double months, double wee return "nanosecond"sv; } -// 7.5.13 ToPartialDuration ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal-topartialduration -ThrowCompletionOr to_partial_duration(GlobalObject& global_object, Value temporal_duration_like) +// 7.5.13 ToTemporalPartialDurationRecord ( temporalDurationLike ), https://tc39.es/proposal-temporal/#sec-temporal-totemporalpartialdurationrecord +ThrowCompletionOr to_temporal_partial_duration_record(GlobalObject& global_object, Value temporal_duration_like) { auto& vm = global_object.vm(); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.h b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.h index 0187b97c57..c99370457f 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.h @@ -145,7 +145,7 @@ ThrowCompletionOr to_temporal_duration_record(GlobalObject&, Val i8 duration_sign(double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds); bool is_valid_duration(double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds); StringView default_temporal_largest_unit(double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds); -ThrowCompletionOr to_partial_duration(GlobalObject&, Value temporal_duration_like); +ThrowCompletionOr to_temporal_partial_duration_record(GlobalObject&, Value temporal_duration_like); ThrowCompletionOr create_temporal_duration(GlobalObject&, double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds, FunctionObject const* new_target = nullptr); Duration* create_negated_temporal_duration(GlobalObject& global_object, Duration const& duration); ThrowCompletionOr calculate_offset_shift(GlobalObject&, Value relative_to_value, double years, double months, double weeks, double days, double hours, double minutes, double seconds, double milliseconds, double microseconds, double nanoseconds); diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp index 7ce28068ac..a0d1a4b623 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/DurationPrototype.cpp @@ -202,8 +202,8 @@ JS_DEFINE_NATIVE_FUNCTION(DurationPrototype::with) // 2. Perform ? RequireInternalSlot(duration, [[InitializedTemporalDuration]]). auto* duration = TRY(typed_this_object(global_object)); - // 3. Let temporalDurationLike be ? ToPartialDuration(temporalDurationLike). - auto temporal_duration_like = TRY(to_partial_duration(global_object, vm.argument(0))); + // 3. Let temporalDurationLike be ? ToTemporalPartialDurationRecord(temporalDurationLike). + auto temporal_duration_like = TRY(to_temporal_partial_duration_record(global_object, vm.argument(0))); // 4. If temporalDurationLike.[[Years]] is not undefined, then // a. Let years be temporalDurationLike.[[Years]].