<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCalendar/range(ofWeekendStart:interval:containing:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCalendar(im)rangeOfWeekendStartDate:interval:containingDate:"
  },
  "title" : "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.

```
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

<doc://com.apple.documentation/documentation/Swift/true> if the given date falls within a weekend period, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)