CPCWeek

public struct CPCWeek

Calendar unit that represents a week.

  • Value that represents a current week.

    Declaration

    Swift

    public static var current: CPCWeek { get }
  • Value that represents next week.

    Declaration

    Swift

    public static var next: CPCWeek { get }
  • Value that represents previous week.

    Declaration

    Swift

    public static var prev: CPCWeek { get }
  • Week number in the year.

    Declaration

    Swift

    public var weekNumber: Int { get }
  • Value that represents a current week in the specified calendar.

    Declaration

    Swift

    public static func current(using calendar: Calendar) -> CPCWeek

    Parameters

    calendar

    Calendar to use.

  • Value that represents next week in the specified calendar.

    Declaration

    Swift

    public static func next(using calendar: Calendar) -> CPCWeek

    Parameters

    calendar

    Calendar to use.

  • Value that represents previous week in the specified calendar.

    Declaration

    Swift

    public static func prev(using calendar: Calendar) -> CPCWeek

    Parameters

    calendar

    Calendar to use.

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

    Declaration

    Swift

    public init(weeksSinceNow: Int)

    Parameters

    weeksSinceNow

    Distance from current week in weeks.