---
title: "dateIntervalOfWeekend(containing:start:interval:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/calendar/dateintervalofweekend(containing:start:interval:)"
---

# dateIntervalOfWeekend(containing:start:interval:)

Find the range of the weekend around the given date, returned via two by-reference parameters.

## Declaration

```swift
func dateIntervalOfWeekend(containing date: Date, start: inout Date, interval: inout TimeInterval) -> Bool
```

## Parameters

- `date`: The date at which to start the search.
- `start`: When the result is true, set

## Return Value

Return Value true if a date range could be found, and false if the date is not in a weekend.

## Discussion

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.

## See Also

### Calculating Intervals

- [dateInterval(of:for:)](foundation/calendar/dateinterval(of:for:).md)
- [dateInterval(of:start:interval:for:)](foundation/calendar/dateinterval(of:start:interval:for:).md)
- [dateIntervalOfWeekend(containing:)](foundation/calendar/dateintervalofweekend(containing:).md)
- [nextWeekend(startingAfter:direction:)](foundation/calendar/nextweekend(startingafter:direction:).md)
- [nextWeekend(startingAfter:start:interval:direction:)](foundation/calendar/nextweekend(startingafter:start:interval:direction:).md)
- [Calendar.SearchDirection](foundation/calendar/searchdirection.md)
