mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
LibJS: Port get_difference_settings() to String
Also make balance_duration() take a StringView as part of this, it only does equality checks.
This commit is contained in:
parent
227379a1da
commit
8f7c2f8292
8 changed files with 14 additions and 14 deletions
|
@ -270,7 +270,7 @@ ThrowCompletionOr<Duration*> difference_temporal_plain_year_month(VM& vm, Differ
|
|||
auto* this_date = TRY(calendar_date_from_fields(vm, calendar, *this_fields));
|
||||
|
||||
// 13. Let untilOptions be ? MergeLargestUnitOption(settings.[[Options]], settings.[[LargestUnit]]).
|
||||
auto* until_options = TRY(merge_largest_unit_option(vm, settings.options, TRY_OR_THROW_OOM(vm, String::from_deprecated_string(settings.largest_unit))));
|
||||
auto* until_options = TRY(merge_largest_unit_option(vm, settings.options, move(settings.largest_unit)));
|
||||
|
||||
// 14. Let result be ? CalendarDateUntil(calendar, thisDate, otherDate, untilOptions).
|
||||
auto* duration = TRY(calendar_date_until(vm, calendar, this_date, other_date, *until_options));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue