range(of:start:interval:for:)
Returns by reference the starting time and duration of a given calendar unit that contains a given date.
Declaration
func range(of unit: NSCalendar.Unit, start datep: AutoreleasingUnsafeMutablePointer<NSDate?>?, interval tip: UnsafeMutablePointer<TimeInterval>?, for date: Date) -> BoolParameters
- unit:
A calendar unit (see Unit for possible values).
- datep:
Upon return, contains the starting time of the calendar unit
unitthat contains the datedate - tip:
Upon return, contains the duration of the calendar unit
unitthat contains the datedate - date:
A date.
Return Value
true if the starting time and duration of a unit could be calculated, otherwise false.