mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibJS+LibLocale: Replace list formatting with ICU
This also largely eliminates the need for some ECMA-402 AOs, as is it all handled internally by ICU (which the spec is basically based on).
This commit is contained in:
parent
d17d131224
commit
5f7251fd91
Notes:
sideshowbarker
2024-07-17 04:49:48 +09:00
Author: https://github.com/trflynn89
Commit: 5f7251fd91
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/110
14 changed files with 217 additions and 377 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Idan Horowitz <idan.horowitz@serenityos.org>
|
||||
* Copyright (c) 2022, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -12,6 +12,7 @@
|
|||
#include <LibJS/Runtime/Intl/AbstractOperations.h>
|
||||
#include <LibJS/Runtime/Object.h>
|
||||
#include <LibJS/Runtime/Temporal/Duration.h>
|
||||
#include <LibLocale/ListFormat.h>
|
||||
|
||||
namespace JS::Intl {
|
||||
|
||||
|
@ -226,6 +227,6 @@ ThrowCompletionOr<Temporal::DurationRecord> to_duration_record(VM&, Value input)
|
|||
i8 duration_record_sign(Temporal::DurationRecord const&);
|
||||
bool is_valid_duration_record(Temporal::DurationRecord const&);
|
||||
ThrowCompletionOr<DurationUnitOptions> get_duration_unit_options(VM&, String const& unit, Object const& options, StringView base_style, ReadonlySpan<StringView> styles_list, StringView digital_base, StringView previous_style);
|
||||
Vector<PatternPartition> partition_duration_format_pattern(VM&, DurationFormat const&, Temporal::DurationRecord const& duration);
|
||||
Vector<::Locale::ListFormatPart> partition_duration_format_pattern(VM&, DurationFormat const&, Temporal::DurationRecord const& duration);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue