Cldr.DateTime.Formatter.extended_year
extended_year, go back to Cldr.DateTime.Formatter module for more information.
Specs
extended_year(Calendar.date(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the Extended year (format symbol u).
Arguments
dateis aDatestruct or any map that contains at least the keys:monthand:calendarnin an integer between 1 and 5 that determines the format of the yearlocaleis any valid locale name returned byCldr.known_locale_names/0or aCldr.LanguageTagstruct. The default isCldr.get_locale/0optionsis aKeywordlist of options. There are no options used inweeK_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
| Symbol | Example | Cldr Format |
|---|---|---|
| u+ | 4601 | Minimim 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.
Specs
extended_year(Calendar.date(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}