Bug 1313793 - Remove Date.prototype.toLocaleFormat uses in browser/base/content. r=florian
authorAndré Bargull <andre.bargull@gmail.com>
Fri, 28 Oct 2016 04:48:08 -0700
changeset 351653 6e4a31120b5362746102351b70776636ffb0e689
parent 351652 6b931b75a6d2628370aa55ff8e472bcb50263abd
child 351654 88013961312c001ea61e2ed0d89855bd02382069
push id13
push userfmarier@mozilla.com
push dateFri, 11 Nov 2016 01:36:56 +0000
reviewersflorian
bugs1313793
milestone52.0a1
Bug 1313793 - Remove Date.prototype.toLocaleFormat uses in browser/base/content. r=florian
browser/base/content/urlbarBindings.xml
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1534,17 +1534,18 @@ file, You can obtain one at http://mozil
           <![CDATA[
           // initially the panel is hidden
           // to avoid impacting startup / new window performance
           aInput.popup.hidden = false;
 
           let showNotification = aInput.shouldShowSearchSuggestionsNotification;
           if (showNotification) {
             let prefs = aInput._prefs;
-            let date = parseInt((new Date()).toLocaleFormat("%Y%m%d"));
+            let now = new Date();
+            let date = now.getFullYear() * 10000 + (now.getMonth() + 1) * 100 + now.getDate();
             let previousDate = prefs.getIntPref("lastSuggestionsPromptDate");
             if (previousDate < date) {
               let remainingDays =
                 prefs.getIntPref("daysBeforeHidingSuggestionsPrompt") - 1;
               prefs.setIntPref("daysBeforeHidingSuggestionsPrompt",
                                remainingDays);
               prefs.setIntPref("lastSuggestionsPromptDate", date);
               if (!remainingDays)