[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}
diff --git a/src/objects/js-date-time-format.cc b/src/objects/js-date-time-format.cc
index 60b6c63..239b618 100644
--- a/src/objects/js-date-time-format.cc
+++ b/src/objects/js-date-time-format.cc
@@ -896,7 +896,8 @@
   // has to be discussed. Revisit once the spec is clarified/revised.
   icu::UnicodeString pattern;
   UErrorCode status = U_ZERO_ERROR;
-  pattern = generator.getBestPattern(skeleton, status);
+  pattern = generator.getBestPattern(skeleton, UDATPG_MATCH_HOUR_FIELD_LENGTH,
+                                     status);
   CHECK(U_SUCCESS(status));
 
   // Make formatter from skeleton. Calendar and numbering system are added
diff --git a/test/intl/regress-527926.js b/test/intl/regress-527926.js
new file mode 100644
index 0000000..3f46479
--- /dev/null
+++ b/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));