Roo/util/Format.js
authorjohn <john@roojs.com>
Tue, 12 Jun 2018 09:02:47 +0000 (17:02 +0800)
committerjohn <john@roojs.com>
Tue, 12 Jun 2018 09:02:47 +0000 (17:02 +0800)
Roo/util/Format.js

index 56f0943..2088bac 100644 (file)
@@ -173,7 +173,7 @@ Roo.util.Format = function(){
          * @param {Number} decimals number of decimal places
          * @return {String} The formatted currency string
          */
-        number : function(v, decimals, thousandsDelimiter = ',')
+        number : function(v, decimals, thousandsDelimiter = false)
         {
             // multiply and round.
             decimals = typeof(decimals) == 'undefined' ? 2 : decimals;
@@ -192,7 +192,7 @@ Roo.util.Format = function(){
             var r = /(\d+)(\d{3})/;
             // add comma's
             while (r.test(whole)) {
-                whole = whole.replace(r, '$1' + ',' + '$2');
+                whole = whole.replace(r, '$1' + thousandsDelimiter + '$2');
             }