Cldr.Number.Format.Options (Cldr Numbers v2.16.0) View Source
Functions to validate and transform options that guide number formatting
Link to this section Summary
Link to this section Types
Specs
currency_symbol() :: :standard | :iso
Specs
fixed_formats() :: :standard | :currency | :accounting | :short | :long
Specs
format() :: binary() | fixed_formats()
Specs
short_format_styles() :: :currency_short | :currency_long | :decimal_short | :decimal_long
Specs
t() :: %Cldr.Number.Format.Options{
currency: Cldr.Currency.code(),
currency_digits: pos_integer(),
currency_spacing: map(),
currency_symbol: term(),
format: format(),
fractional_digits: pos_integer(),
locale: Cldr.LanguageTag.t(),
minimum_grouping_digits: pos_integer(),
number_system: Cldr.Number.System.system_name(),
pattern: String.t(),
round_nearest: pos_integer(),
rounding_mode: Decimal.rounding(),
symbols: Cldr.Number.Symbol.t()
}
Link to this section Functions
Specs
short_format_styles() :: [atom()]
Specs
validate_options(Cldr.Math.number_or_decimal(), Cldr.backend(), [ {atom(), term()} ]) :: {:ok, t()} | {:error, {module(), String.t()}}