---
title: Calendar.MatchingPolicy
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/calendar/matchingpolicy
---

# Calendar.MatchingPolicy

A hint to the search algorithm to control the method used for searching for dates.

## Declaration

```swift
enum MatchingPolicy
```

## Topics

### Enumeration Cases

- [Calendar.MatchingPolicy.nextTime](foundation/calendar/matchingpolicy/nexttime.md)
- [Calendar.MatchingPolicy.nextTimePreservingSmallerComponents](foundation/calendar/matchingpolicy/nexttimepreservingsmallercomponents.md)
- [Calendar.MatchingPolicy.previousTimePreservingSmallerComponents](foundation/calendar/matchingpolicy/previoustimepreservingsmallercomponents.md)
- [Calendar.MatchingPolicy.strict](foundation/calendar/matchingpolicy/strict.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Scanning Dates

- [startOfDay(for:)](foundation/calendar/startofday(for:).md)
- [enumerateDates(startingAfter:matching:matchingPolicy:repeatedTimePolicy:direction:using:)](foundation/calendar/enumeratedates(startingafter:matching:matchingpolicy:repeatedtimepolicy:direction:using:).md)
- [nextDate(after:matching:matchingPolicy:repeatedTimePolicy:direction:)](foundation/calendar/nextdate(after:matching:matchingpolicy:repeatedtimepolicy:direction:).md)
- [Calendar.RepeatedTimePolicy](foundation/calendar/repeatedtimepolicy.md)
