View Source Plausible.Cldr.Rbnf.NumberSystem (Plausible v0.0.1)

Functions to implement the number system rule-based-number-format rules of CLDR.

These rules are defined only on the "und" locale and represent specialised number formatting.

The standard public API for RBNF is via the Cldr.Number.to_string/2 function.

The functions on this module are defined at compile time based upon the RBNF rules defined in the Unicode CLDR data repository. Available rules are identified by:

iex> Plausible.Cldr.Rbnf.NumberSystem.rule_sets(:und)
...> |> Enum.sort()
[
  :armenian_lower,
  :armenian_upper,
  :cyrillic_lower,
  :ethiopic,
  :georgian,
  :greek_lower,
  :greek_upper,
  :hebrew,
  :hebrew_item,
  :roman_lower,
  :roman_upper,
  :tamil,
  :zz_default
]

A rule can then be invoked on an available rule_set. For example

iex> Plausible.Cldr.Rbnf.NumberSystem.roman_upper(123, :und)
"CXXIII"

This particular call is equivalent to the call through the public API of:

iex> Plausible.Cldr.Number.to_string(123, format: :roman)
{:ok, "CXXIII"}

Summary

Functions

Link to this function

armenian_lower(number, locale)

View Source
Link to this function

armenian_upper(number, locale)

View Source
Link to this function

cyrillic_lower(number, locale)

View Source
Link to this function

cyrillic_lower_1_10(number, language_tag)

View Source
Link to this function

cyrillic_lower_final(number, language_tag)

View Source
Link to this function

cyrillic_lower_post(number, language_tag)

View Source
Link to this function

cyrillic_lower_thousands(number, language_tag)

View Source
Link to this function

ethiopic(number, locale)

View Source
Link to this function

ethiopic_p1(number, language_tag)

View Source
Link to this function

ethiopic_p2(number, language_tag)

View Source
Link to this function

ethiopic_p3(number, language_tag)

View Source
Link to this function

ethiopic_p(number, language_tag)

View Source
Link to this function

georgian(number, locale)

View Source
Link to this function

greek_lower(number, locale)

View Source
Link to this function

greek_numeral_majuscules(number, language_tag)

View Source
Link to this function

greek_numeral_minuscules(number, language_tag)

View Source
Link to this function

greek_upper(number, locale)

View Source
Link to this function

hebrew_0_99(number, language_tag)

View Source
Link to this function

hebrew_item(number, locale)

View Source
Link to this function

hebrew_item_hundreds(number, language_tag)

View Source
Link to this function

hebrew_thousands(number, language_tag)

View Source
Link to this function

roman_lower(number, locale)

View Source
Link to this function

roman_upper(number, locale)

View Source
Link to this function

rule_sets(rbnf_locale_name)

View Source
Link to this function

tamil_thousands(number, language_tag)

View Source
Link to this function

zz_default(number, locale)

View Source