MyApp.Cldr.Number.to_range_string

You're seeing just the function to_range_string, go back to MyApp.Cldr.Number module for more information.
Link to this function

to_range_string(range, options \\ [])

View Source

Specs

to_range_string(Range.t(), Keyword.t() | Keyword.t() | map()) ::
  {:ok, String.t()} | {:error, {module(), String.t()}}

Formats the first and last numbers of a range and applies the :range format for a locale and number system.

Arguments

  • number is an integer, float or Decimal to be formatted

  • options is a keyword list defining how the number is to be formatted. See Cldr.Number.to_string/3 for a description of the available options.

Example

iex> MyApp.Cldr.Number.to_range_string 1234..5678
{:ok, "1,234–5,678"}