mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Update spec numbers for the Intl.DurationFormat proposal
This proposal has reached stage 4 and was merged into the ECMA-402 spec.
See: 3ff3cc7
This commit is contained in:
parent
7c8d16ffca
commit
5764eeab05
Notes:
github-actions[bot]
2025-03-01 13:50:56 +00:00
Author: https://github.com/trflynn89
Commit: 5764eeab05
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3734
38 changed files with 208 additions and 220 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@ladybird.org>
|
||||
* Copyright (c) 2022-2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -10,13 +10,13 @@ namespace JS::Intl {
|
|||
|
||||
GC_DEFINE_ALLOCATOR(PluralRules);
|
||||
|
||||
// 16 PluralRules Objects, https://tc39.es/ecma402/#pluralrules-objects
|
||||
// 17 PluralRules Objects, https://tc39.es/ecma402/#pluralrules-objects
|
||||
PluralRules::PluralRules(Object& prototype)
|
||||
: NumberFormatBase(prototype)
|
||||
{
|
||||
}
|
||||
|
||||
// 16.5.2 ResolvePlural ( pluralRules, n ), https://tc39.es/ecma402/#sec-resolveplural
|
||||
// 17.5.2 ResolvePlural ( pluralRules, n ), https://tc39.es/ecma402/#sec-resolveplural
|
||||
Unicode::PluralCategory resolve_plural(PluralRules const& plural_rules, Value number)
|
||||
{
|
||||
// 1. If n is not a finite Number, then
|
||||
|
@ -35,7 +35,7 @@ Unicode::PluralCategory resolve_plural(PluralRules const& plural_rules, Value nu
|
|||
return plural_rules.formatter().select_plural(number.as_double());
|
||||
}
|
||||
|
||||
// 16.5.4 ResolvePluralRange ( pluralRules, x, y ), https://tc39.es/ecma402/#sec-resolveplural
|
||||
// 17.5.4 ResolvePluralRange ( pluralRules, x, y ), https://tc39.es/ecma402/#sec-resolveplural
|
||||
ThrowCompletionOr<Unicode::PluralCategory> resolve_plural_range(VM& vm, PluralRules const& plural_rules, Value start, Value end)
|
||||
{
|
||||
// 1. If x is NaN or y is NaN, throw a RangeError exception.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue