---
title: "nextDate(after:matching:value:options:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nscalendar/nextdate(after:matching:value:options:)"
---

# nextDate(after:matching:value:options:)

Returns the next date after a given date matching the given calendar unit value.

## Declaration

```swift
func nextDate(after date: Date, matching unit: NSCalendar.Unit, value: Int, options: NSCalendar.Options = []) -> Date?
```

## Parameters

- `date`: The date for which to perform the calculation.
- `unit`: The component to use. For possible values, see doc://com.apple.foundation/documentation/Foundation/NSCalendar/Unit.
- `value`: The value for the given component.
- `options`: Options for the calculation. For possible values, see doc://com.apple.foundation/documentation/Foundation/NSCalendar/Options.

## Return Value

Return Value A new NSDate object.

## See Also

### Scanning Dates

- [startOfDay(for:)](foundation/nscalendar/startofday(for:).md)
- [enumerateDates(startingAfter:matching:options:using:)](foundation/nscalendar/enumeratedates(startingafter:matching:options:using:).md)
- [nextDate(after:matching:options:)](foundation/nscalendar/nextdate(after:matching:options:).md)
- [nextDate(after:matchingHour:minute:second:options:)](foundation/nscalendar/nextdate(after:matchinghour:minute:second:options:).md)
- [NSCalendar.Options](foundation/nscalendar/options.md)
- [NSWrapCalendarComponents](foundation/nswrapcalendarcomponents-api.md)
