Cldr.Unit.known_units_for_category
You're seeing just the function
known_units_for_category
, go back to Cldr.Unit module for more information.
Specs
known_units_for_category(category()) :: {:ok, [translatable_unit(), ...]} | {:error, {module(), String.t()}}
Returns the list of units defined for a given category.
Arguments
category
is any unit category returned byCldr.Unit.known_unit_categories/0
.
See also Cldr.Unit.known_units_by_category/0
.
Example
=> Cldr.Unit.known_units_for_category :volume
{
:ok,
[
:cubic_centimeter,
:centiliter,
:hectoliter,
:cubic_kilometer,
:acre_foot,
...
]
}