Template:Money/toDec

From Wikinews, the free news source you can write!
Jump to navigation Jump to search
[edit] Template documentation

Usage[edit]

This template takes a currency code and turns it into an interger specifying the number of places to round to (currencies that do not use base 10 [MRO and MGA] round to 1 place)

If it can't match a currency name, it returns 2 as a sane default. It converts all curency symbols to uppercase. It returns 2 decimal places for things that don't have inheirent rounding (like gold [XAU] and silver [XAG]) or that it doesn't know. Some examples:

All information taken from table on Wikipedia article ISO 4217 on 00:47, 20 September 2009 (UTC).

See also[edit]