<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCalendar/Options",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSCalendarOptions"
  },
  "title" : "NSCalendar.Options"
}
-->

# NSCalendar.Options

The options for arithmetic operations involving calendars.

```
struct Options
```

## Topics

### Initializers

[`init(rawValue:)`](/documentation/Foundation/NSCalendar/Options/init(rawValue:))

### Constants

[`wrapComponents`](/documentation/Foundation/NSCalendar/Options/wrapComponents)

Specifies that the components specified for an `NSDateComponents` object should be incremented and wrap around to zero/one on overflow, but should not cause higher units to be incremented.

[`matchStrictly`](/documentation/Foundation/NSCalendar/Options/matchStrictly)

Specifies that the operation should travel as far forward or backward as necessary looking for a match.

[`searchBackwards`](/documentation/Foundation/NSCalendar/Options/searchBackwards)

Specifies that the operation should travel backwards to find the previous match before the given date.

[`matchPreviousTimePreservingSmallerUnits`](/documentation/Foundation/NSCalendar/Options/matchPreviousTimePreservingSmallerUnits)

Specifies that, when there is no matching time before the end of the next instance of the next highest unit specified in the given `NSDateComponents` object, this method uses the *previous* existing value of the missing unit and preserves the lower units’ values.

[`matchNextTimePreservingSmallerUnits`](/documentation/Foundation/NSCalendar/Options/matchNextTimePreservingSmallerUnits)

Specifies that, when there is no matching time before the end of the next instance of the next highest unit specified in the given `NSDateComponents` object, this method uses the *next* existing value of the missing unit and preserves the lower units’ values.

[`matchNextTime`](/documentation/Foundation/NSCalendar/Options/matchNextTime)

Specifies that, when there is no matching time before the end of the next instance of the next highest unit specified in the given `NSDateComponents` object, this method uses the *next* existing value of the missing unit and *does not* preserve the lower units’ values.

[`matchFirst`](/documentation/Foundation/NSCalendar/Options/matchFirst)

Specifies that, if there are two or more matching times, the operation should return the first occurrence.

[`matchLast`](/documentation/Foundation/NSCalendar/Options/matchLast)

Specifies that, if there are two or more matching times, the operation should return the last occurrence.

[`NSWrapCalendarComponents`](/documentation/Foundation/NSWrapCalendarComponents)

Specifies that the components specified for an `NSDateComponents` object should be incremented and wrap around to zero/one on overflow, but should not cause higher units to be incremented.



---

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)