Cldr.Unit.Conversion.convert_to_base_unit

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

convert_to_base_unit(unit)

View Source

Convert a unit into its base unit.

For example, the base unit for length is meter. The base unit is an intermediary unit used in all conversions.

Arguments

Returns

  • unit converted to its base unit as a t:Unit.t() or

  • {;error, {exception, reason}} as an error

Example

iex> unit = Cldr.Unit.new!(:kilometer, 10)
iex> Cldr.Unit.Conversion.convert_to_base_unit unit
{:ok, Cldr.Unit.new!(:meter, 10000)}