diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp index ad9be9e7ab..3ffa0a1982 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Duration.cpp @@ -692,7 +692,7 @@ ThrowCompletionOr<DateDurationRecord> unbalance_duration_relative(VM& vm, double auto* until_options = Object::create(realm, nullptr); // iii. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "month"). - MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, js_string(vm, "month"sv))); + MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, PrimitiveString::create(vm, "month"sv))); // iv. Let untilResult be ? CalendarDateUntil(calendar, relativeTo, newRelativeTo, untilOptions, dateUntil). auto* until_result = TRY(calendar_date_until(vm, *calendar, relative_to, new_relative_to, *until_options, date_until)); @@ -928,7 +928,7 @@ ThrowCompletionOr<DateDurationRecord> balance_duration_relative(VM& vm, double y auto* until_options = Object::create(realm, nullptr); // m. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "month"). - MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, js_string(vm, "month"sv))); + MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, PrimitiveString::create(vm, "month"sv))); // n. Let untilResult be ? CalendarDateUntil(calendar, relativeTo, newRelativeTo, untilOptions, dateUntil). auto* until_result = TRY(calendar_date_until(vm, calendar, relative_to, new_relative_to, *until_options, date_until)); @@ -954,7 +954,7 @@ ThrowCompletionOr<DateDurationRecord> balance_duration_relative(VM& vm, double y until_options = Object::create(realm, nullptr); // vi. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "month"). - MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, js_string(vm, "month"sv))); + MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, PrimitiveString::create(vm, "month"sv))); // vii. Set untilResult to ? CalendarDateUntil(calendar, relativeTo, newRelativeTo, untilOptions, dateUntil). until_result = TRY(calendar_date_until(vm, calendar, relative_to, new_relative_to, *until_options, date_until)); @@ -1109,7 +1109,7 @@ ThrowCompletionOr<DurationRecord> add_duration(VM& vm, double years1, double mon auto* difference_options = Object::create(realm, nullptr); // i. Perform ! CreateDataPropertyOrThrow(differenceOptions, "largestUnit", dateLargestUnit). - MUST(difference_options->create_data_property_or_throw(vm.names.largestUnit, js_string(vm, date_largest_unit))); + MUST(difference_options->create_data_property_or_throw(vm.names.largestUnit, PrimitiveString::create(vm, date_largest_unit))); // j. Let dateDifference be ? CalendarDateUntil(calendar, relativeTo, end, differenceOptions). auto* date_difference = TRY(calendar_date_until(vm, calendar, &relative_to, end, *difference_options)); @@ -1312,7 +1312,7 @@ ThrowCompletionOr<RoundedDuration> round_duration(VM& vm, double years, double m auto* until_options = Object::create(realm, nullptr); // l. Perform ! CreateDataPropertyOrThrow(untilOptions, "largestUnit", "year"). - MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, js_string(vm, "year"sv))); + MUST(until_options->create_data_property_or_throw(vm.names.largestUnit, PrimitiveString::create(vm, "year"sv))); // m. Let timePassed be ? CalendarDateUntil(calendar, relativeTo, daysLater, untilOptions). auto* time_passed = TRY(calendar_date_until(vm, *calendar, relative_to, days_later, *until_options)); |