-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Original commit message: [Intl] Fix output of hour:'2-digit', hour12: true Bug: chromium:527926 Change-Id: I783ba59c6e4b117163e058032fb04283e1f43c46 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1529260 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#60379} Refs: v8/v8@fb63e5c Fixes: #30369 Backport-PR-URL: #30372
- Loading branch information
1 parent
0f3ae77
commit 3e0709c
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2019 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. | ||
|
||
let date = new Date(2015, 8, 1, 3, 0, 0); | ||
var fmt = new Intl.DateTimeFormat('ru', {hour:'2-digit', minute: '2-digit'}) | ||
assertEquals("03:00", fmt.format(date)); | ||
|
||
fmt = new Intl.DateTimeFormat( | ||
'en', {hour:'2-digit', minute: '2-digit', hour12: false}); | ||
assertEquals("03:00", fmt.format(date)); | ||
|
||
fmt = new Intl.DateTimeFormat( | ||
'ru', {hour:'2-digit', minute: '2-digit', hour12: false}); | ||
assertEquals("03:00", fmt.format(date)); | ||
|
||
fmt = new Intl.DateTimeFormat( | ||
'ru', {hour:'2-digit', minute: '2-digit', hour12: true}); | ||
assertEquals("03:00 AM", fmt.format(date)); |