Bug 1512808 - fix date format detection in initLocaleShortDateFormat(). r=jorgk DONTBUILD
authoraceman <acelists@atlas.sk>
Sat, 08 Dec 2018 14:57:00 +0100
changeset 33868 c3afcea69ad2f397df3ec89b316b859106332d57
parent 33867 091ba7e6fd2c48932e3ab65b63b1b20f340c7b2e
child 33869 9e7cf2d56e1532d215965c6fce6693be8299b546
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1512808
Bug 1512808 - fix date format detection in initLocaleShortDateFormat(). r=jorgk DONTBUILD
mailnews/base/content/dateFormat.js
--- a/mailnews/base/content/dateFormat.js
+++ b/mailnews/base/content/dateFormat.js
@@ -20,17 +20,17 @@ function initLocaleShortDateFormat()
   gSearchDateFormat = 3;
   gSearchDateSeparator = "/";
   gSearchDateLeadingZeros = true;
 
   try {
     const dateFormatter = new Services.intl.DateTimeFormat(undefined,
       { dateStyle: "short" });
     var aDate = new Date(1999, 11, 1);
-    var dateString = dateFormatter.format(aDate);
+    var dateString = dateFormatter.format(aDate).replace(/ /g,"");
 
     // find out the separator
     var possibleSeparators = "/-.";
     var arrayOfStrings;
     for ( var i = 0; i < possibleSeparators.length; ++i )
     {
       arrayOfStrings = dateString.split( possibleSeparators[i] );
       if ( arrayOfStrings.length == 3 )