Structure
Date.FormatStyle.Symbol.CyclicYear
struct CyclicYear
Overview
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 |
|---|---|
A shortened representation of the cyclic year appropriate for space-constrained applications. |
|
The shortest representation of the cyclic year. |
|
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.
Topics
Type Properties
static var abbreviated: Date.FormatStyle.Symbol.CyclicYearAbbreviated cyclic year name. For example, “甲子”.static var narrow: Date.FormatStyle.Symbol.CyclicYearNarrow cyclic year name. For example, “甲子”.static let omitted: Date.FormatStyle.Symbol.CyclicYearThe option for not including the symbol in the formatted output.static var wide: Date.FormatStyle.Symbol.CyclicYearWide cyclic year name. For example, “甲子”.
Relationships
Conforms To
Swift.EquatableSwift.HashableSwift.SendableSwift.SendableMetatype