diff --git a/common.gypi b/common.gypi index 770f99955a26cc..f5786ef89f209f 100644 --- a/common.gypi +++ b/common.gypi @@ -33,7 +33,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.54', + 'v8_embedder_string': '-node.55', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/src/objects/intl-objects.cc b/deps/v8/src/objects/intl-objects.cc index 60c3a0721be228..714099893d903a 100644 --- a/deps/v8/src/objects/intl-objects.cc +++ b/deps/v8/src/objects/intl-objects.cc @@ -138,7 +138,9 @@ icu::SimpleDateFormat* CreateICUDateFormat(Isolate* isolate, status)); icu::UnicodeString pattern; if (U_SUCCESS(status)) - pattern = generator->getBestPattern(skeleton, status); + pattern = generator->getBestPattern(skeleton, + UDATPG_MATCH_HOUR_FIELD_LENGTH, + status); date_format = new icu::SimpleDateFormat(pattern, icu_locale, status); if (U_SUCCESS(status)) { diff --git a/deps/v8/test/intl/regress-527926.js b/deps/v8/test/intl/regress-527926.js new file mode 100644 index 00000000000000..3f464794da19e3 --- /dev/null +++ b/deps/v8/test/intl/regress-527926.js @@ -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));