---
title: "nextWeekend(startingAfter:direction:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/calendar/nextweekend(startingafter:direction:)"
---

# nextWeekend(startingAfter:direction:)

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

## Declaration

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

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

## Discussion

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.

## 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)
- [dateIntervalOfWeekend(containing:start:interval:)](foundation/calendar/dateintervalofweekend(containing:start:interval:).md)
- [nextWeekend(startingAfter:start:interval:direction:)](foundation/calendar/nextweekend(startingafter:start:interval:direction:).md)
- [Calendar.SearchDirection](foundation/calendar/searchdirection.md)
