A Currency is used to the display numeric data as money. Note that
NumberFormat does not do exchange currency conversion, it only uses the
currency for displaying symbols and other conventions to mark the number as
The Currency type holds a valid ISO 4217 currency code.
String -> Maybe.Maybe Intl.Currency.Currency
Checks the string as a valid currency code, and returns a currency if it is.
-- Going back to the Gold Standard fromCurrencyCode "XAU"
If a string is passed that is not a valid currency code,
Nothing will be
Note that any 3-letter string will work, but if it isn't a defined currency code, then the formatting will have no symbol or currency name. It will just use the code you provided.
Intl.Currency.Currency -> String
Gets the string currency code from a Currency
toCurrencyCode Currency.eur == "EUR"
A few currencies have been pre-defined for convenience.
United States Dollar