CPCYear
public struct CPCYear
Calendar unit that represents a year.
-
Declaration
Swift
@usableFromInline internal let calendarWrapper: CalendarWrapper
-
Declaration
Swift
@usableFromInline internal let backingValue: BackingStorage
-
Undocumented
Declaration
Swift
@usableFromInline internal let indicesCache: ContiguousArray<Int>
-
Declaration
Swift
internal static func indices(for value: BackingStorage, using calendar: Calendar) -> ContiguousArray<Int>
-
Declaration
Swift
internal init(backedBy value: BackingStorage, calendar: CalendarWrapper)
-
Undocumented
Declaration
Swift
internal typealias BackingStorage = __CPCYearBackingStorage
-
Undocumented
See moreDeclaration
Swift
internal typealias BackingStorage = __CPCYearBackingStorage
-
Declaration
Swift
public init(containing date: Date, calendar: Calendar)
-
Declaration
Swift
public typealias Element = CPCMonth
-
Undocumented
Declaration
Swift
internal typealias UnitBackingType = BackingStorage
-
Declaration
Swift
internal static let representedUnit: Calendar.Component
-
Declaration
Swift
internal static let descriptionDateFormatTemplate: String
-
Undocumented
Declaration
Swift
internal func componentValue(of element: Element) -> Int
-
Value that represents a current year.
Declaration
Swift
public static var current: CPCYear { get }
-
Value that represents next year.
Declaration
Swift
public static var next: CPCYear { get }
-
Value that represents previous year.
Declaration
Swift
public static var prev: CPCYear { get }
-
Era of the represented year.
Declaration
Swift
public var era: Int { get }
-
Number of year represented by this value.
Declaration
Swift
public var year: Int { get }
-
Value that represents a current year in the specified calendar.
Declaration
Swift
public static func current(using calendar: Calendar) -> CPCYear
Parameters
calendar
Calendar to use.
-
Value that represents next year in the specified calendar.
Declaration
Swift
public static func next(using calendar: Calendar) -> CPCYear
Parameters
calendar
Calendar to use.
-
Value that represents previous year in the specified calendar.
Declaration
Swift
public static func prev(using calendar: Calendar) -> CPCYear
Parameters
calendar
Calendar to use.
-
Create a new value, corresponding to a year in the future or past.
Declaration
Swift
public init(yearsSinceNow: Int)
Parameters
yearsSinceNow
Distance from current year in years.
-
Value that represents a current year in the specified calendar.
Declaration
Swift
internal static func current(using calendar: CalendarWrapper) -> CPCYear
Parameters
calendar
Calendar to use.
-
Value that represents next year in the specified calendar.
Declaration
Swift
internal static func next(using calendar: CalendarWrapper) -> CPCYear
Parameters
calendar
Calendar to use.
-
Value that represents previous year in the specified calendar.
Declaration
Swift
internal static func prev(using calendar: CalendarWrapper) -> CPCYear
Parameters
calendar
Calendar to use.