Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed variable name to a more correct one

  • Loading branch information...
commit d82247ee5397a00099ef4761b63d44f1994ab733 1 parent 61204b8
@erethnor authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/globalize.js
View
8 lib/globalize.js
@@ -836,7 +836,7 @@ formatDate = function( value, format, culture ) {
subpattern = '',
decimalsSeparatorIndex = -1,
uniqueCharsFound = [],
- hasThousandsSeparator = false;
+ hasGroupsSeparator = false;
for (i = 0; i < len; i++) {
var isEscaped;
@@ -853,7 +853,7 @@ formatDate = function( value, format, culture ) {
( subpatternContainer === subpatterns && subpattern.length )
)
)
- hasThousandsSeparator = true;
+ hasGroupsSeparator = true;
} else if ( i !== len ) {
// TODO /[.,#%‰E0-9]/i
if ( isEscaped || /[^.,#0]/.test( pattern.charAt(i) ) ) {
@@ -928,7 +928,7 @@ formatDate = function( value, format, culture ) {
roundedString = Math.abs( rounded ).toString(),
curSubpatterns = firstSubpatternContainer;
- if ( hasThousandsSeparator )
+ if ( hasGroupsSeparator )
formattedIntDec.push( expandInt( rounded, intMinLength, formatInfo ) );
else {
formattedIntDec.push( zeroPad( roundedString.split('.').shift(), intMinLength, true ) );
@@ -971,7 +971,7 @@ formatDate = function( value, format, culture ) {
var sliceLength = subpatterns[i].indexOf( '.' );
if ( !~sliceLength )
sliceLength = subpatterns[i].length;
- if ( hasThousandsSeparator )
+ if ( hasGroupsSeparator )
sliceLength += 0;
curFragment = formattedIntDec[0].slice( formattedIntDec[0].length - sliceLength );
Please sign in to comment.
Something went wrong with that request. Please try again.