Search documentation of bb

# BB.Cldr.Rbnf.NumberSystem (bb v0.8.0)

View Source

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> BB.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> BB.Cldr.Rbnf.NumberSystem.roman_upper(123, :und)
    "CXXIII"

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

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

# Summary

## Functions

all_rule_sets()
armenian_lower(number)
armenian_lower(number, locale)
armenian_upper(number)
armenian_upper(number, locale)
cyrillic_lower(number)
cyrillic_lower(number, locale)
cyrillic_lower_1_10(number, language_tag)
cyrillic_lower_final(number, language_tag)
cyrillic_lower_post(number, language_tag)
cyrillic_lower_thousands(number, language_tag)
ethiopic(number)
ethiopic(number, locale)
ethiopic_p1(number, language_tag)
ethiopic_p2(number, language_tag)
ethiopic_p3(number, language_tag)
ethiopic_p(number, language_tag)
georgian(number)
georgian(number, locale)
greek_lower(number)
greek_lower(number, locale)
greek_numeral_majuscules(number, language_tag)
greek_numeral_minuscules(number, language_tag)
greek_upper(number)
greek_upper(number, locale)
hebrew(number)
hebrew(number, locale)
hebrew_0_99(number, language_tag)
hebrew_item(number)
hebrew_item(number, locale)
hebrew_item_hundreds(number, language_tag)
hebrew_thousands(number, language_tag)
roman_lower(number)
roman_lower(number, locale)
roman_upper(number)
roman_upper(number, locale)
rule_sets()
rule_sets(rbnf_locale_name)
tamil(number)
tamil(number, locale)
tamil_thousands(number, language_tag)
zz_default(number)
zz_default(number, locale)

# Functions

# all_rule_sets()

# armenian_lower(number)

# armenian_lower(number, locale)

# armenian_upper(number)

# armenian_upper(number, locale)

# cyrillic_lower(number)

# cyrillic_lower(number, locale)

# cyrillic_lower_1_10(number, language_tag)

# cyrillic_lower_final(number, language_tag)

# cyrillic_lower_post(number, language_tag)

# cyrillic_lower_thousands(number, language_tag)

# ethiopic(number)

# ethiopic(number, locale)

# ethiopic_p1(number, language_tag)

# ethiopic_p2(number, language_tag)

# ethiopic_p3(number, language_tag)

# ethiopic_p(number, language_tag)

# georgian(number)

# georgian(number, locale)

# greek_lower(number)

# greek_lower(number, locale)

# greek_numeral_majuscules(number, language_tag)

# greek_numeral_minuscules(number, language_tag)

# greek_upper(number)

# greek_upper(number, locale)

# hebrew(number)

# hebrew(number, locale)

# hebrew_0_99(number, language_tag)

# hebrew_item(number)

# hebrew_item(number, locale)

# hebrew_item_hundreds(number, language_tag)

# hebrew_thousands(number, language_tag)

# roman_lower(number)

# roman_lower(number, locale)

# roman_upper(number)

# roman_upper(number, locale)

# rule_sets()

# rule_sets(rbnf_locale_name)

# tamil(number)

# tamil(number, locale)

# tamil_thousands(number, language_tag)

# zz_default(number)

# zz_default(number, locale)