Tagged currency
7 capabilities
money.add
Add, subtract and negate monetary amounts, refusing to mix currencies.
add_money in Python
money.compare
Compare two amounts of one currency, refusing to compare across currencies; min, max and clamp too.
A group of 4:
compare_money, min_money, max_money, clamp_money
money.convert
Convert an amount to another currency at a supplied exact rate, with an explicit rounding mode.
convert_money in Python
money.currency-digits
How many decimal places a currency's minor unit has, from the ISO 4217 list.
currency_digits in Python
money.format
Render a monetary amount as text, using the currency's real minor-unit precision.
format_money in Python
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parse_money in Python