<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 10.0.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Calendar/dateIntervalOfWeekend(containing:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation8CalendarV21dateIntervalOfWeekend10containingAA04DateD0VSgAA0H0V_tF"
  },
  "title" : "dateIntervalOfWeekend(containing:)"
}
-->

# dateIntervalOfWeekend(containing:)

Returns a `DateInterval` of the weekend contained by the given date, or `nil` if the date is not in a weekend.

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

## Discussion

---

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)