Permalink
Browse files

Changed variable name to a more correct one

  • Loading branch information...
1 parent 61204b8 commit d82247ee5397a00099ef4761b63d44f1994ab733 @therazor committed Jun 7, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/globalize.js
View
@@ -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 );

0 comments on commit d82247e

Please sign in to comment.