Documentation
¶
Overview ¶
Package money is a library to deal with money and currency representation. Inspired by ruby money library http://rubymoney.github.io/money.
Defaults
Options{
"currency": "USD",
"with_cents": true,
"with_currency": false,
"with_symbol": true,
"with_symbol_space": false,
"with_thousands_separator": true,
}
Usage
Format(10) // "$10.00"
Format(10, Options{"currency": "EUR"}) // "€10.00"
Format(10, Options{"with_cents": false}) // "$10"
Format(10, Options{"with_currency:" true }) // "$10.00 USD"
Format(10, Options{"with_symbol": false}) // "10.00"
Format(10, Options{"with_symbol_space":true}) // "$ 10.00"
Format(1000) // "$1,000.00"
Format(1000, Options{"with_thousands_separator": false}) // "$1000.00"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.