CPCWeek
public struct CPCWeek
Calendar unit that represents a week.
-
Undocumented
See moreDeclaration
Swift
internal struct BackingStorage : Hashable
-
Declaration
Swift
@usableFromInline internal let backingValue: UnitBackingType
-
Declaration
Swift
@usableFromInline internal let calendarWrapper: CalendarWrapper
-
Undocumented
Declaration
Swift
@usableFromInline internal let indicesCache: ContiguousArray<Int>
-
Declaration
Swift
internal init(backedBy value: UnitBackingType, calendar: CalendarWrapper)
-
Declaration
Swift
public init(containing date: Date, calendar: Calendar)
-
Declaration
Swift
public typealias Element = CPCDay
-
Undocumented
Declaration
Swift
internal typealias UnitBackingType = BackingStorage
-
Declaration
Swift
internal static let representedUnit: Calendar.Component
-
Declaration
Swift
internal static let descriptionDateFormatTemplate: String
-
Declaration
Swift
internal static func indices(for value: BackingStorage, using calendar: Calendar) -> ContiguousArray<Int>
-
Undocumented
Declaration
Swift
internal func componentValue(of element: Element) -> Int
-
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.
-
Value that represents a current week in the specified calendar.
Declaration
Swift
internal static func current(using calendar: CalendarWrapper) -> CPCWeek
Parameters
calendar
Calendar to use.
-
Value that represents next week in the specified calendar.
Declaration
Swift
internal static func next(using calendar: CalendarWrapper) -> CPCWeek
Parameters
calendar
Calendar to use.
-
Value that represents previous week in the specified calendar.
Declaration
Swift
internal static func prev(using calendar: CalendarWrapper) -> CPCWeek
Parameters
calendar
Calendar to use.