Bug 1338083 - Restore full year in Library date columns. r=jfkthame, a=jcristau
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 09 Feb 2017 10:38:51 +0100
changeset 376107 e26d8e25df97df3471cab4a48e0c0bfe4843dc2a
parent 376106 6dc598834b57179cb3b859915420757852f34583
child 376108 c7ae06b81e8e685e4ff81f33086355f7e7e90d05
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, jcristau
bugs1338083
milestone53.0a2
Bug 1338083 - Restore full year in Library date columns. r=jfkthame, a=jcristau MozReview-Commit-ID: GIp7xzdAC9C
browser/components/places/content/treeView.js
browser/components/places/tests/chrome/test_treeview_date.xul
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -509,17 +509,17 @@ PlacesTreeView.prototype = {
   },
 
   __dateFormatter: null,
   get _dateFormatter() {
     if (!this.__dateFormatter) {
       const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
                      .getService(Ci.nsIXULChromeRegistry)
                      .getSelectedLocale("global", true);
-      const dtOptions = { year: "2-digit", month: "numeric", day: "numeric",
+      const dtOptions = { year: "numeric", month: "numeric", day: "numeric",
                           hour: "numeric", minute: "numeric" };
       this.__dateFormatter = new Intl.DateTimeFormat(locale, dtOptions);
     }
     return this.__dateFormatter;
   },
 
   COLUMN_TYPE_UNKNOWN: 0,
   COLUMN_TYPE_TITLE: 1,
--- a/browser/components/places/tests/chrome/test_treeview_date.xul
+++ b/browser/components/places/tests/chrome/test_treeview_date.xul
@@ -122,17 +122,17 @@
                   is(text, node.title, "Title is correct");
                 break;
               case "url":
                 is(text, node.uri, "Uri is correct");
                 break;
               case "date":
                 let timeObj = new Date(node.time / 1000);
                 // Default is short date format.
-                let dtOptions = { year: '2-digit', month: 'numeric', day: 'numeric',
+                let dtOptions = { year: 'numeric', month: 'numeric', day: 'numeric',
                                   hour: 'numeric', minute: 'numeric' };
                 // For today's visits we don't show date portion.
                 if (node.uri == "http://at.midnight.com/" ||
                     node.uri == "http://after.midnight.com/") {
                   dtOptions = { hour: 'numeric', minute: 'numeric' };
                 } else if (node.uri != "http://before.midnight.com/") {
                   // Avoid to test spurious uris, due to how the test works
                   // a redirecting uri could be put in the tree while we test.