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
date
is aDate
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 yearlocale
is any valid locale name returned byCldr.known_locale_names/0
or aCldr.LanguageTag
struct. The default isCldr.get_locale/0
options
is aKeyword
list 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()}