Cldr.Unit.Format.grammar

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

grammar(unit, options \\ [])

View Source (since 3.5.0)

Specs

grammar(Cldr.Unit.t(), Keyword.t()) ::
  grammar_list() | {grammar_list(), grammar_list()}

Traverses the components of a unit and resolves a list of base units with their gramatical case and plural selector definitions for a given locale.

This function relies upon the internal representation of units and grammatical features and is primarily for the support of formatting a function through Cldr.Unit.to_string/2.

Arguments

  • unit is a t:Cldr.Unit or a binary unit string

Options

Returns

Examples