omitted
The option for not including the symbol in the formatted output.
- iOS
- 16.4+
- macOS
- 13.3+
- tvOS
- 16.4+
- watchOS
- 9.4+
static let omitted: Date.FormatStyle.Symbol.Year
The option for not including the symbol in the formatted output.
static let omitted: Date.FormatStyle.Symbol.Year
s20FoundationEssentials4DateV0A20InternationalizationE11FormatStyleV6SymbolV4YearV7omittedAJvpZ
What are these?4056A
import FoundationEssentials
import FoundationInternationalization
struct Year
struct Date
Date
represents a single point in time.
struct FormatStyle
Strategies for formatting a Date
.
struct Symbol
static var defaultDigits: Date.FormatStyle.Symbol.Year { get }
Minimum number of digits that shows the full year. For example, 2
, 20
, 201
, 2017
, 20173
.
static var twoDigits: Date.FormatStyle.Symbol.Year { get }
Two low-order digits. Padded or truncated if necessary. For example, 02
, 20
, 01
, 17
, 73
.
static func extended(minimumLength: Int = 1) -> Date.FormatStyle.Symbol.Year
Extended year. 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.
static func padded(_ length: Int) -> Date.FormatStyle.Symbol.Year
Three or more digits. Padded if necessary. For example, 002
, 020
, 201
, 2017
, 20173
.
static func relatedGregorian(minimumLength: Int = 1) -> Date.FormatStyle.Symbol.Year
Related Gregorian year. For non-Gregorian calendars, this corresponds to the extended Gregorian year in which the calendar’s year begins. Related Gregorian years are often displayed, for example, when formatting dates in the Japanese calendar — e.g. “2012(平成24)年1月15日” — or in the Chinese calendar — e.g. “2012壬辰年腊月初四”.