WeekRange
public struct WeekRange : Equatable, Hashable
Abstract interval between two days of week (including the limits).
-
Undocumented
Declaration
Swift
public var start: DayOfWeek
-
Undocumented
Declaration
Swift
public var duration: Int { get }
-
Determines whether the interval contains a specific day of week. Interval limits (start and finish) are considered to be included.
Declaration
Swift
public func contains(_ dayOfWeek: DayOfWeek) -> Bool
-
Determines whether the interval intersects another interval. Touching interval limits are considered to generate intersection as well.
Declaration
Swift
public func intersects(_ interval: WeekRange) -> Bool
-
Returns the intersection with another interval. Touching interval limits are considered to generate (single day) intersection as well. Returns nil when intervals don’t intersect.
Declaration
Swift
public func intersecting(_ interval: WeekRange) -> WeekRange?
-
Indicates whether all days of the week are scheduled within the interval.
Declaration
Swift
public var isContinuous: Bool { get }
-
Indicates whether the interval limits are time ordered (start is before finish). Single day intervals (for which interval limits are equal) are considered entropic as well.
Declaration
Swift
public var isEntropic: Bool { get }
-
Week interval including all week days (Sunday-Saturday).
Declaration
Swift
static let continuous: WeekRange
-
Week interval between Monday and Friday (1-5).
Declaration
Swift
static let standard: WeekRange