dateIntervalOfWeekend(containing:start:interval:)
Find the range of the weekend around the given date, returned via two by-reference parameters.
Declaration
func dateIntervalOfWeekend(containing date: Date, start: inout Date, interval: inout TimeInterval) -> BoolParameters
- date:
The date at which to start the search.
- start:
When the result is
true, set
Return Value
true if a date range could be found, and false if the date is not in a weekend.
Discussion
Note that a given entire day within a calendar is not necessarily all in a weekend or not; weekends can start in the middle of a day in some calendars and locales.