mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibJS+LibLocale: Port Intl.NumberFormat to String
This commit is contained in:
parent
76fd5f2756
commit
0c2efa285a
13 changed files with 169 additions and 149 deletions
|
@ -448,7 +448,7 @@ ThrowCompletionOr<Vector<PatternPartition>> partition_duration_format_pattern(VM
|
|||
auto number = MUST_OR_THROW_OOM(format_numeric(vm, *number_format, MathematicalValue(value)));
|
||||
|
||||
// 5. Append the new Record { [[Type]]: unit, [[Value]]: num} to the end of result.
|
||||
result.append({ unit, TRY_OR_THROW_OOM(vm, String::from_deprecated_string(number)) });
|
||||
result.append({ unit, move(number) });
|
||||
|
||||
// 6. If unit is "hours" or "minutes", then
|
||||
if (unit.is_one_of("hours"sv, "minutes"sv)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue