---
title: "range(ofWeekendStart:interval:containing:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nscalendar/range(ofweekendstart:interval:containing:)"
---

# range(ofWeekendStart:interval:containing:)

Returns whether a given date falls within a weekend period, and if so, returns by reference the start date and time interval of the weekend range.

## Declaration

```swift
func range(ofWeekendStart datep: AutoreleasingUnsafeMutablePointer<NSDate?>?, interval tip: UnsafeMutablePointer<TimeInterval>?, containing date: Date) -> Bool
```

## Parameters

- `datep`: Upon return, contains the starting date of the next weekend period.
- `tip`: Upon return, contains the time interval of the next weekend period.
- `date`: The date to use to perform the calculation.

## Return Value

Return Value true if the given date falls within a weekend period, otherwise false.

## Discussion

Discussion Note that a particular calendar day may not necessarily fall entirely within a weekend period, as weekends can start in the middle of a day in some calendars and locales.

## See Also

### Getting Calendar Information

- [calendarIdentifier](foundation/nscalendar/calendaridentifier.md)
- [firstWeekday](foundation/nscalendar/firstweekday.md)
- [locale](foundation/nscalendar/locale.md)
- [timeZone](foundation/nscalendar/timezone.md)
- [maximumRange(of:)](foundation/nscalendar/maximumrange(of:).md)
- [minimumRange(of:)](foundation/nscalendar/minimumrange(of:).md)
- [minimumDaysInFirstWeek](foundation/nscalendar/minimumdaysinfirstweek.md)
- [ordinality(of:in:for:)](foundation/nscalendar/ordinality(of:in:for:).md)
- [range(of:in:for:)](foundation/nscalendar/range(of:in:for:).md)
- [range(of:start:interval:for:)](foundation/nscalendar/range(of:start:interval:for:).md)
- [NSCalendar.Unit](foundation/nscalendar/unit.md)
