v8/test/intl/plural-rules/select-range.js
Frank Tang 09de56b06e [intl] NumberFormat v3 Part 4 SelectRange
Implement the Intl.PluralRules.prototype.selectRange (start, end)
of the spec
See https://tc39.es/proposal-intl-numberformat-v3/out/pluralrules/diff.html


https://chromestatus.com/guide/edit/5707621009981440

Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit

Bug: v8:10776
Change-Id: Ie9c56df7ce68199492281fdf2483c3d6f822cc9e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504421
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79495}
2022-03-16 11:01:35 +00:00

8 lines
296 B
JavaScript

// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-intl-number-format-v3
const pl = new Intl.PluralRules("sl");
assertEquals("few", pl.selectRange(102, 201));