jQuery Format Currency Tests

    formatCurrency(destination optional, settings)

    settings

    1. default
    2. default (html) 123
    3. symbol 123
    4. roundUp 124.5451
    5. roundDown 124.554
    6. threeDecimals 123.000
    7. noDecimals 124.00
    8. oneDecimal 123.9
    9. roundToDollar 124.000
    10. roundUpToDollar 123.9
    11. roundDownToDollar 123.4
    12. roundUpToNegativeDollar -123.9
    13. roundDownToNegativeDollar -123.4
    14. doNotAddZeroCentsOnDollar 123
    15. noRounding 123.456
    16. keepTrailingZeros 124.0000
    17. noTrailingDecimal 123.
    18. warnOnDecimalsEntered 123.456 with warning: OK
    19. warnOnDecimalsEnteredBeforeRounded 123.456 with warning:
    20. onlyWarnOnDecimalsEnteredAsAppropriate 123.45 with warning:
    21. roundOneUp 123.999
    22. roundOneDown -123.999
    23. negativeBrackets (123)
    24. positiveFormat 123
    25. negativeFormat -123
    26. negativeFormat of decimal -0.25
    27. defaultValue
    28. noDefaultValue
    29. lonelyNegative -
    30. doNoRemoveZero 0
    31. issue2_doNotRound 9.45
    32. issue6_doNotRound 154.20
    33. decimalSymbol 123
    34. digitGroupSymbol 123123
    35. groupDigits 123123
    36. src - 1000 dest -
    37. src - dest -
    38. colorize 123123
    39. colorize-neg -123123
    40. region 1000
    41. region fallback 1000
    42. region full fallback 1000
    43. setting multiple destinations 1000 - 1000
    44. issue #11
    45. issue #13 33195.5
    46. issue #15 1,234.56
    47. issue #19 -.01

    default (English - US)

    1. 1000
    2. 1000.50
    3. 1000.05
    4. $1000.05
    5. -1000
    6. 1000.052324
    7. 1000.0588
    8. ABCDEFG1000.05
    9. 1000.05ABCDEFG
    10. 10ABCDEFG00.05
    11. 1000000

    de (German)

    1. 1000
    2. 1000€
    3. 1.000,33
    4. -1000

    en-IN (India)

    1. 1000
    2. Rs. 1000
    3. Rs. 1,000.33
    4. -1000

    fr (Frence)

    1. 1000
    2. 1000 €
    3. 1 000,33 €
    4. -1000

    it (Italian)

    1. 1000
    2. € 1000
    3. € 1.000,33
    4. -1000

    es (Spanish)

    1. 1000
    2. 1000 €
    3. 1 000,33 €
    4. -1000

    zh (Chinese)

    1. 1000
    2. ¥1000
    3. ¥1,000.33
    4. -1000

    ja (Japanese)

    1. 1000
    2. ¥1000
    3. ¥1,000.33
    4. -1000

    toNumber(settings)

    default (English - US)

    1. $1234.56
    2. 1000
    3. 1,000.00
    4. abcdefg
    5. 100abc
    6. pass
    7. (100)

    DE (German)

    1. 1234,56
    2. 1.234,56 €
    3. 1000
    4. 1.000,11

    en-IN (India)

    1. 1234.56
    2. Rs. 1,234.56
    3. 1000
    4. 1,000.11

    asNumber(settings)

    default (English - US)

    1. 1234.56
    2. 1234.56
    3. 1000
    4. 1000
    5. 1,000.55
    6. abcdefg
    7. 100abc
    8. 1000
    9. pass
    10. -100
    11. (100)
    12. -100

    DE (German)

    1. 1234,56
    2. 1.234,56 €
    3. 1000
    4. 1.000,11

    en-IN (India)

    1. 1234.56
    2. Rs. 1,234.56
    3. 1000
    4. 1,000.11