<!--
{
  "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/nextWeekend(startingAfter:direction:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation8CalendarV11nextWeekend13startingAfter9directionAA12DateIntervalVSgAA0H0V_AC15SearchDirectionOtF"
  },
  "title" : "nextWeekend(startingAfter:direction:)"
}
-->

# nextWeekend(startingAfter:direction:)

Returns a `DateInterval` of the next weekend, which starts strictly after the given date.

```
func nextWeekend(startingAfter date: Date, direction: Calendar.SearchDirection = .forward) -> DateInterval?
```

## Parameters

`date`

The date at which to begin the search.

`direction`

Which direction in time to search. The default value is `.forward`.

## Return Value

A `DateInterval`, or `nil` if weekends do not exist in the specific calendar or locale.

## Discussion

If `direction` is `.backward`, then finds the previous weekend range strictly before the given date.

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.

---

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)