hledger-lib-1.42.1: A library providing the core functionality of hledger
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hledger.Data.Currency

Description

Currency names, symbols and codes. Reference: - https://www.xe.com/symbols - https://www.xe.com/currency

Synopsis

Documentation

currencies :: [(String, CurrencyCode, CurrencySymbol)] Source #

currencySymbolToCode :: CurrencySymbol -> Maybe CurrencyCode Source #

Look for a ISO 4217 currency code corresponding to this currency symbol.

>>> currencySymbolToCode ""
Nothing
>>> currencySymbolToCode "$"
Just "USD"

currencyCodeToSymbol :: CurrencyCode -> Maybe CurrencySymbol Source #

Look for a currency symbol corresponding to this ISO 4217 currency code.

>>> currencyCodeToSymbol "CZK"  -- Just "Kč"
Just "K\269"