CPCDay

public struct CPCDay

Calendar unit that represents a single day.

  • Value that represents a current day.

    Declaration

    Swift

    public static var today: CPCDay { get }
  • Value that represents yesterday.

    Declaration

    Swift

    public static var yesterday: CPCDay { get }
  • Value that represents tomorrow.

    Declaration

    Swift

    public static var tomorrow: CPCDay { get }
  • era

    Era of the represented month’s year.

    Declaration

    Swift

    public var era: Int { get }
  • Year of represented day.

    Declaration

    Swift

    public var year: Int { get }
  • Month of represented day.

    Declaration

    Swift

    public var month: Int { get }
  • Week number of represented day.

    Declaration

    Swift

    public var week: Int { get }
  • day

    This day’s number.

    Declaration

    Swift

    public var day: Int { get }
  • Year that contains represented day.

    Declaration

    Swift

    public var containingYear: CPCYear { get }
  • Month that contains represented day.

    Declaration

    Swift

    public var containingMonth: CPCMonth { get }
  • Week that contains represented day.

    Declaration

    Swift

    public var containingWeek: CPCWeek { get }
  • Value that represents a current day in the specified calendar.

    Declaration

    Swift

    public static func today(using calendar: Calendar) -> CPCDay

    Parameters

    calendar

    Calendar to use.

  • Value that represents yesterday in the specified calendar.

    Declaration

    Swift

    public static func yesterday(using calendar: Calendar) -> CPCDay

    Parameters

    calendar

    Calendar to use.

  • Value that represents tomorrow in the specified calendar.

    Declaration

    Swift

    public static func tomorrow(using calendar: Calendar) -> CPCDay

    Parameters

    calendar

    Calendar to use.

  • Create a new value, corresponding to a day in the future or past.

    Declaration

    Swift

    public init(daysSinceNow: Int)

    Parameters

    daysSinceNow

    Distance from today in days.