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

# nextWeekend(startingAfter:start:interval:direction:)

Returns the range of the next weekend via two inout parameters. The weekend starts strictly after the given date.

## Declaration

```swift
func nextWeekend(startingAfter date: Date, start: inout Date, interval: inout TimeInterval, direction: Calendar.SearchDirection = .forward) -> Bool
```

## Parameters

- `date`: The date at which to begin the search.
- `start`: Upon return, the starting time of the calendar component that contains the date.
- `interval`: Upon return, the duration of the calendar component that contains the date.
- `direction`: Which direction in time to search. The default value is .forward.

## Return Value

Return Value false if the calendar and locale do not have the concept of a weekend, otherwise true.

## 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:direction:)](foundation/calendar/nextweekend(startingafter:direction:).md)
- [Calendar.SearchDirection](foundation/calendar/searchdirection.md)
