mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibJS: Hook the Intl mathematical value into Intl.NumberFormat
This commit is contained in:
parent
0026e9a4c8
commit
292b8908b5
Notes:
sideshowbarker
2024-07-17 09:37:30 +09:00
Author: https://github.com/trflynn89
Commit: 292b8908b5
Pull-request: https://github.com/SerenityOS/serenity/pull/14623
Reviewed-by: https://github.com/linusg ✅
10 changed files with 201 additions and 305 deletions
|
@ -181,7 +181,7 @@ ThrowCompletionOr<Vector<PatternPartitionWithUnit>> partition_relative_time_patt
|
|||
auto value_partitions = partition_number_pattern(global_object, relative_time_format.number_format(), Value(value));
|
||||
|
||||
// 21. Let pr be ! ResolvePlural(relativeTimeFormat.[[PluralRules]], value).
|
||||
auto plurality = resolve_plural(global_object, relative_time_format.plural_rules(), Value(value));
|
||||
auto plurality = resolve_plural(relative_time_format.plural_rules(), Value(value));
|
||||
|
||||
// 22. Let pattern be po.[[<pr>]].
|
||||
auto pattern = patterns.find_if([&](auto& p) { return p.plurality == plurality; });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue