dateIntervalOfWeekend(containing:)
Returns a DateInterval of the weekend contained by the given date, or nil if the date is not in a weekend.
Declaration
func dateIntervalOfWeekend(containing date: Date) -> DateInterval?Parameters
- date:
The date contained in the weekend.
Return Value
A DateInterval, or nil if the date is not in a weekend.