Cldr Numbers v0.3.1 Cldr.Rbnf View Source
Functions to implement Rules Based Number Formatting (rbnf)
During compilation RBNF rules are extracted and generated
as function bodies by Cldr.Rbnf.Ordinal
, Cldr.Rbnf.Cardinal
and Cldr.Rbnf.NumberSystem
.
The functions in this module would not normally be of common use outside of supporting the compilation phase.
Link to this section Summary
Functions
Returns a map that merges all rules by the primary dimension of RuleGroup, within which rbnf rules are keyed by locale
Returns {:ok, rbnf_rules} for a locale
or {:error, {Cldr.NoRbnf, info}}
Returns rbnf_rules for a locale
or raises an exception if
there are no rules
Returns the list of locales that that have RBNF defined
Link to this section Functions
Returns a map that merges all rules by the primary dimension of RuleGroup, within which rbnf rules are keyed by locale.
This function is primarily intended to support compile-time generation of functions to process rbnf rules.
for_locale(Cldr.Locale.t()) :: %{} | nil
Returns {:ok, rbnf_rules} for a locale
or {:error, {Cldr.NoRbnf, info}}
locale
is any locale returned byCldr.Rbnf.known_locales/0
.
Returns rbnf_rules for a locale
or raises an exception if
there are no rules.
locale
is any locale returned byCldr.Rbnf.known_locales/0
.
Returns the list of locales that that have RBNF defined
This list is the set of known locales for which there are rbnf rules defined.