DayRange
public struct DayRange : Equatable, Hashable
Abstract interval between two times of day.
-
Undocumented
Declaration
Swift
public var start: TimeOfDay
-
Undocumented
Declaration
Swift
public var duration: TimeInterval { get }
-
Determines whether the interval contains a specific time of day. Interval limits (start and finish) are considered to be included.
Declaration
Swift
public func contains(_ timeOfDay: TimeOfDay) -> Bool
-
Determines whether the interval intersects another interval. Touching interval limits are considered to generate intersection as well.
Declaration
Swift
public func intersects(_ interval: DayRange) -> Bool
-
Returns the intersection with another interval. Touching interval limits are considered to generate (momentary) intersection as well. Returns nil when intervals don’t intersect.
Declaration
Swift
public func intersecting(_ interval: DayRange) -> DayRange?
-
Indicates whether all time of the day is scheduled within the interval.
Declaration
Swift
public var isContinuous: Bool { get }
-
Indicates whether the interval limits are time ordered (start is before finish). Momentary intervals (for which interval limits are equal) are considered entropic as well.
Declaration
Swift
public var isEntropic: Bool { get }
-
Indicates whether the interval limits are equal (start and finish point to the same moment of day).
Declaration
Swift
public var isMomentary: Bool { get }
-
Day interval including all day time (00:00-24:00).
Declaration
Swift
static let continuous: DayRange
-
Day interval between 8 AM and 4 PM (08:00-16:00).
Declaration
Swift
static let standard: DayRange