Search documentation of bb

# BB.Cldr.Number.PluralRule.Range (bb v0.8.0)

View Source

Implements plural rules for ranges

# Summary

## Functions

plural_rule(first, last, locale)

Returns a final plural type for a start-of-range plural type, an end-of-range plural type and a locale.

# Functions

# plural_rule(first, last, locale)

    @spec plural_rule(
      first :: Cldr.Number.PluralRule.plural_type(),
      last :: Cldr.Number.PluralRule.plural_type(),
      locale :: Cldr.Locale.locale_name() | Cldr.LanguageTag.t()
    ) :: Cldr.Number.PluralRule.plural_type() | {:error, {module(), String.t()}}

Returns a final plural type for a start-of-range plural type, an end-of-range plural type and a locale.

## Arguments

- `first` is a plural type for the start of a range

- `last` is a plural type for the end of a range

- `locale` is any `Cldr.LanguageTag.t` or a language name (not locale name)

## Example

    iex> BB.Cldr.Number.PluralRule.Range.plural_rule :other, :few, "ar"
    :few