CPCDateIntervalInitializable
public protocol CPCDateIntervalInitializable : CPCDateInterval
Common protocol for types that can be initialized with a date interval.
-
init(_:)Default implementationCreates a new, empty date interval.
Default Implementation
Undocumented
Undocumented
Declaration
Swift
init(_ date: Date)Parameters
dateThis date is used as
startandendof resulting date interval simultaneously. -
Creates a new date interval that is equivalent to another one.
Declaration
Swift
init<R>(_ other: R) where R : RangeExpression, R.Bound == DateParameters
otherDate interval to be copied.
-
Creates a new date interval that is equivalent to another one.
Declaration
Swift
init<R>(_ other: R) where R : CPCDateIntervalParameters
otherDate interval to be copied.
-
clamped(to:)Default implementationReturns a copy of this date interval clamped to the given limiting date interval.
Default Implementation
Undocumented
Undocumented
Declaration
Swift
func clamped<R>(to other: R) -> Self where R : RangeExpression, R.Bound == DateParameters
otherThe interval to clamp the bounds of this date interval.
Return Value
A new date interval clamped to the bounds of
other. -
Returns a copy of this date interval clamped to the given limiting date interval.
Declaration
Swift
func clamped<R>(to other: R) -> Self where R : CPCDateIntervalParameters
otherThe interval to clamp the bounds of this date interval.
Return Value
A new date interval clamped to the bounds of
other.
View on GitHub
Install in Dash
CPCDateIntervalInitializable Protocol Reference