Cldr.Unit.measurement_systems_for_unit

You're seeing just the function measurement_systems_for_unit, go back to Cldr.Unit module for more information.
Link to this function

measurement_systems_for_unit(unit)

View Source (since 3.4.0)

Specs

measurement_systems_for_unit(t() | unit()) ::
  [measurement_system(), ...] | {:error, {module(), String.t()}}

Returns the measurement systems for a given unit.

Arguments

Returns

  • A list of measurement systems to which the unit belongs.

  • {:error, {exception, message}}

Examples

iex> Cldr.Unit.measurement_systems_for_unit :foot
[:ussystem, :uksystem]

iex> Cldr.Unit.measurement_systems_for_unit :meter
[:metric, :si]

iex> Cldr.Unit.measurement_systems_for_unit :invalid
{:error, {Cldr.UnknownUnitError, "The unit :invalid is not known."}}