Enumeration
Calendar.MatchingPolicy
iOS 8.0+
iPadOS 8.0+
Mac Catalyst 8.0+
macOS 10.10+
tvOS 9.0+
watchOS 2.0+
A hint to the search algorithm to control the method used for searching for dates.
enum MatchingPolicy
Topics
Enumeration Cases
case nextTimeIf there is no matching time before the end of the next instance of the next higher component to the highest specified component in theDateComponentsargument, the algorithm will return the next existing time which exists.case nextTimePreservingSmallerComponentsIf specified, and there is no matching time before the end of the next instance of the next higher component to the highest specified component in theDateComponentsargument, the method will return the next existing value of the missing component and preserves the lower components’ values (e.g., no 2:37am results in 3:37am, if that exists).case previousTimePreservingSmallerComponentsIf there is no matching time before the end of the next instance of the next higher component to the highest specified component in theDateComponentsargument, the algorithm will return the previous existing value of the missing component and preserves the lower components’ values.case strictIf specified, the algorithm travels as far forward or backward as necessary looking for a match.
Default Implementations
Relationships
Conforms To
Swift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.HashableSwift.SendableSwift.SendableMetatype