formatCurrency(destination optional, settings)
settings
- default
- default (html) 123
- symbol 123
- roundUp 124.5451
- roundDown 124.554
- threeDecimals 123.000
- noDecimals 124.00
- oneDecimal 123.9
- roundToDollar 124.000
- roundUpToDollar 123.9
- roundDownToDollar 123.4
- roundUpToNegativeDollar -123.9
- roundDownToNegativeDollar -123.4
- doNotAddZeroCentsOnDollar 123
- noRounding 123.456
- keepTrailingZeros 124.0000
- noTrailingDecimal 123.
- warnOnDecimalsEntered 123.456 with warning: OK
- warnOnDecimalsEnteredBeforeRounded 123.456 with warning:
- onlyWarnOnDecimalsEnteredAsAppropriate 123.45 with warning:
- roundOneUp 123.999
- roundOneDown -123.999
- negativeBrackets (123)
- positiveFormat 123
- negativeFormat -123
- negativeFormat of decimal -0.25
- defaultValue
- noDefaultValue
- lonelyNegative -
- doNoRemoveZero 0
- issue2_doNotRound 9.45
- issue6_doNotRound 154.20
- decimalSymbol 123
- digitGroupSymbol 123123
- groupDigits 123123
src -
1000
dest -
src -
dest -
- colorize 123123
- colorize-neg -123123
- region 1000
- region fallback 1000
- region full fallback 1000
- setting multiple destinations 1000 - 1000
- issue #11
- issue #13 33195.5
- issue #15 1,234.56
- issue #19 -.01
default (English - US)
1000
1000.50
1000.05
$1000.05
-1000
ABCDEFG1000.05
1000.05ABCDEFG
10ABCDEFG00.05
1000000
de (German)
1000
1000€
1.000,33
-1000
en-IN (India)
1000
Rs. 1000
Rs. 1,000.33
-1000
fr (Frence)
1000
1000 €
1 000,33 €
-1000
it (Italian)
1000
€ 1000
€ 1.000,33
-1000
es (Spanish)
1000
1000 €
1 000,33 €
-1000
zh (Chinese)
1000
¥1000
¥1,000.33
-1000
ja (Japanese)
1000
¥1000
¥1,000.33
-1000
toNumber(settings)
default (English - US)
$1234.56
1000
1,000.00
abcdefg
100abc
pass
(100)
DE (German)
1234,56
1.234,56 €
1000
1.000,11
en-IN (India)
1234.56
Rs. 1,234.56
1000
1,000.11
asNumber(settings)
default (English - US)
1234.56
1234.56
1000
1000
1,000.55
abcdefg
100abc
1000
pass
-100
(100)
-100
DE (German)
1234,56
1.234,56 €
1000
1.000,11
en-IN (India)
1234.56
Rs. 1,234.56
1000
1,000.11