v8/test/intl/displaynames/constructor-v2.js
Frank Tang c0f90e5923 Implement DisplayNames v2
Add "calendar", and "dateTimeField"
Add option for languageDisplay

https://tc39.es/intl-displaynames-v2/
https://chromestatus.com/feature/5082027281874944
Design Doc:
https://docs.google.com/document/d/17hQz4nOC7PJYhxc_MU-BRoT6BnYGZv66XlU1iGX0ywQ/edit#

Bug: v8:11637
Change-Id: Ie7dc80d16956f0e668b11e600e47f5bafb081ff7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2924523
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75027}
2021-06-08 17:49:36 +00:00

22 lines
631 B
JavaScript

// Copyright 2021 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_displaynames_v2
assertDoesNotThrow(
() => new Intl.DisplayNames(
'sr', {type: 'calendar'}));
assertDoesNotThrow(
() => new Intl.DisplayNames(
'sr', {type: 'dateTimeField'}));
assertDoesNotThrow(
() => new Intl.DisplayNames(
'sr', {type: 'language', languageDisplay: 'standard'}));
assertDoesNotThrow(
() => new Intl.DisplayNames(
'sr', {type: 'language', languageDisplay: 'dialect'}));