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 367048 a02c7784fc530b6409e72026f4ea0ee76aeb614f
parent 367047 65be24609b44bc07afabf5581cffea84722ed796
child 367049 fe1a313151e8ffec4016ec1da4c8100a9fa2d850
push id6916
push userryanvm@gmail.com
push dateFri, 10 Feb 2017 20:42:06 +0000
treeherdermozilla-beta@fe1a313151e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, jcristau
bugs1338083
milestone52.0
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
@@ -513,17 +513,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.