<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCalendar/nextDate(after:matching:value:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCalendar(im)nextDateAfterDate:matchingUnit:value:options:"
  },
  "title" : "nextDate(after:matching:value:options:)"
}
-->

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

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

```
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 [`NSCalendar.Unit`](/documentation/Foundation/NSCalendar/Unit).

`value`

The value for the given component.

`options`

Options for the calculation. For possible values, see [`NSCalendar.Options`](/documentation/Foundation/NSCalendar/Options).

## Return Value

A new `NSDate` object.

## 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)