One Logo Pool Ball
Foundation · IOS API REFERENCE

Date.FormatStyle.Symbol.CyclicYear

struct · iOS 15.0+ · SDK 27.1

struct CyclicYear

A type that specifies a format for a cyclic year in a date format style. Calendars such as the Chinese lunar calendar and Hindu calendars use 60-year cycles of year names. If the calendar doesn't provide cyclic year-name data, or if the year value to format is out of the range of years for which the system provides cyclic name data, then the formatting is numeric, as in ``Date/FormatStyle/Symbol/Year``. The ``Date/FormatStyle/Symbol/CyclicYear`` type includes static factory variables that create custom ``Date/FormatStyle/Symbol/CyclicYear`` objects: |Factory variable|Description| |---|---| | ``abbreviated`` | A shortened representation of the cyclic year appropriate for space-constrained applications. | | ``narrow`` | The shortest representation of the cyclic year. | | ``wide`` | The full representation of the cyclic year. | If no format is specified as a parameter, the ``abbreviated`` static variable is the default format. For more information about formatting dates, see ``Date/FormatStyle``.

Members (4)

get · iOS 15.0+

abbreviated

TypeScript
static get abbreviated(): Date_FormatStyle_Symbol_CyclicYear
Swift declaration
static var abbreviated: Date.FormatStyle.Symbol.CyclicYear { get }

Abbreviated cyclic year name. For example, "甲子".

get · iOS 15.0+

wide

TypeScript
static get wide(): Date_FormatStyle_Symbol_CyclicYear
Swift declaration
static var wide: Date.FormatStyle.Symbol.CyclicYear { get }

Wide cyclic year name. For example, "甲子".

get · iOS 15.0+

narrow

TypeScript
static get narrow(): Date_FormatStyle_Symbol_CyclicYear
Swift declaration
static var narrow: Date.FormatStyle.Symbol.CyclicYear { get }

Narrow cyclic year name. For example, "甲子".

get · iOS 18.0+

omitted

TypeScript
static get omitted(): Date_FormatStyle_Symbol_CyclicYear
Swift declaration
static let omitted: Date.FormatStyle.Symbol.CyclicYear

The option for not including the symbol in the formatted output.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →