mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Emanuele Torre <torreemanuele6@gmail.com>
|
||||
* Copyright (c) 2020-2022, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2020-2023, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
@@ -474,7 +474,7 @@ ThrowCompletionOr<DeprecatedString> Console::format_time_since(Core::ElapsedTime
|
||||
auto& vm = realm().vm();
|
||||
|
||||
auto elapsed_ms = timer.elapsed_time().to_milliseconds();
|
||||
auto duration = TRY(Temporal::balance_duration(vm, 0, 0, 0, 0, elapsed_ms, 0, "0"_sbigint, "year"));
|
||||
auto duration = TRY(Temporal::balance_duration(vm, 0, 0, 0, 0, elapsed_ms, 0, "0"_sbigint, "year"sv));
|
||||
|
||||
auto append = [&](StringBuilder& builder, auto format, auto... number) {
|
||||
if (!builder.is_empty())
|
||||
|
||||
Reference in New Issue
Block a user