SoftBank.Cldr.Number.Format.decimal_format_list_for
You're seeing just the function
decimal_format_list_for
, go back to SoftBank.Cldr.Number.Format module for more information.
Specs
decimal_format_list_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) :: {:ok, [String.t()]} | {:error, {module(), String.t()}}
Returns the list of decimal formats for a configured locale.
Arguments
locale
is any valid locale name returned byCldr.known_locale_names/0
or aCldr.LanguageTag
struct returned bySoftBank.Cldr.Locale.new!/1
. The default isSoftBank.Cldr.get_locale/0
This function exists to allow the decimal formatter to precompile all the known formats at compile time. Its use is not otherwise recommended.
Example
iex> SoftBank.Cldr.Number.Format.decimal_format_list_for("en")
{:ok, ["#,##0%", "#,##0.###", "#E0", "0 billion", "0 million", "0 thousand",
"0 trillion", "00 billion", "00 million", "00 thousand", "00 trillion",
"000 billion", "000 million", "000 thousand", "000 trillion", "000B", "000K",
"000M", "000T", "00B", "00K", "00M", "00T", "0B", "0K", "0M", "0T",
"¤#,##0.00", "¤#,##0.00;(¤#,##0.00)", "¤000B", "¤000K", "¤000M",
"¤000T", "¤00B", "¤00K", "¤00M", "¤00T", "¤0B", "¤0K", "¤0M", "¤0T"]}