CPCYear

public struct CPCYear

Calendar unit that represents a year.

  • 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

    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.