Cldr.DateTime.Formatter.cyclic_year
You're seeing just the function
cyclic_year
, go back to Cldr.DateTime.Formatter module for more information.
Specs
cyclic_year(Calendar.date(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the cyclic year (format symbol U
) name for
non-gregorian calendars.
NOTE: In the current implementation, the cyclic year is
delegated to Cldr.DateTime.Formatter.year/3
(format symbol y
) and does not return a localized
cyclic year.
Format Symbol
Symbol | Example | Cldr Format |
---|---|---|
U, UU, UUU | "甲子" | Abbreviated |
UUUU | "甲子" (for now) | Wide |
UUUUU | "甲子" (for now) | Narrow |
Calendars such as the Chinese lunar
calendar (and related calendars) and the Hindu calendars
use 60-year cycles of year names. If the calendar does
not provide cyclic year name data, or if the year value
to be formatted is out of the range of years for which
cyclic name data is provided, then numeric formatting
is used (behaves like format symbol y
).
Currently the CLDR data only provides abbreviated names, which will be used for all requested name widths.
Specs
cyclic_year(Calendar.date(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}