-
Dan’s Expression for Counting – in Dutch???
I found Dan’s counter a couple of years ago and it was exactly the help I needed on a project. The video was such a smashing success that I was asked for a version in Dutch.
In doing the translation, I was told that the Dutch use a period instead of a comma as the thousands separator. I’m scratching my head on how to make that change in the expression.
Would appreciate any help …
David
numDecimals = 0;
commas = true;
dollarSign = false;
beginCount = -0;
endCount = 105999999999;
dur = 9;t = time - inPoint;
s = ease (t, 0, dur, beginCount, endCount).toFixed(numDecimals);prefix = "";
if (s[0] == "-"){
prefix = "-";
s = s.substr(1);
}
if(dollarSign) prefix += "$";if (commas){
decimals = "";
if (numDecimals > 0){
decimals = s.substr(-(numDecimals + 1));
s = s.substr(0,s.length - (numDecimals + 1));
}
outStr = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i--){
outStr += "," + s.substr(-i*3,3);
}
prefix + outStr + decimals;
}else{
prefix + s;
}