class ICU::Currencies

Overview

Currencies

Encapsulates information about a currency

Usage

ICU::Currencies.currency("fr_FR")   # => "EUR"
ICU::Currencies.numeric_code("EUR") # => 978

NOTE the .numeric_code method requires ICU >= 49

See also

Defined in:

icu/currencies.cr

Class Method Summary

Class Method Detail

def self.currency(locale : String) : String #

Returns the currency for a specified locale

ICU::Currencies.currency("fr_FR") # => "EUR"

FIXME not thread-safe


[View source]
def self.numeric_code(currency : String) : Int32 #

Returns the code associated to a currency

ICU::Currencies.numeric_code("EUR") # => 978

[View source]