Cldr.DateTime.Formatter.extended_year

You're seeing just the function extended_year, go back to Cldr.DateTime.Formatter module for more information.
Link to this function

extended_year(extended_year, n \\ 1, options \\ [])

View Source

Specs

extended_year(Calendar.date(), integer(), Keyword.t()) ::
  String.t() | {:error, String.t()}

Returns the Extended year (format symbol u).

Arguments

  • date is a Date struct or any map that contains at least the keys :month and :calendar

  • n in an integer between 1 and 5 that determines the format of the year

  • locale is any valid locale name returned by Cldr.known_locale_names/0 or a Cldr.LanguageTag struct. The default is Cldr.get_locale/0

  • options is a Keyword list of options. There are no options used in weeK_aligned_year/4

NOTE: This current implementation always returns the year provided in the supplied date. This means u returns the same result as the format y.

Format Symbol

SymbolExampleCldr Format
u+4601Minimim necessary digits

This is a single number designating the year of this calendar system, encompassing all supra-year fields.

For example, for the Julian calendar system, year numbers are positive, with an era of BCE or CE. An extended year value for the Julian calendar system assigns positive values to CE years and negative values to BCE years, with 1 BCE being year 0.

For u, all field lengths specify a minimum number of digits; there is no special interpretation for uu.

Link to this function

extended_year(date, n, locale, backend, options \\ [])

View Source

Specs

extended_year(Calendar.date(), integer(), locale(), Cldr.backend(), Keyword.t()) ::
  String.t() | {:error, String.t()}