Computes the next date which matches (or most closely matches) a given set of components.
- iOS 8.0+
- macOS 10.9+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 6.0.1+
The starting date.
The components to search for.
Specifies the technique the search algorithm uses to find results. Default value is
Specifies the behavior when multiple matches are found. Default value is
Specifies the direction in time to search. Default is
Date representing the result of the search, or
nil if a result could not be found.
The general semantics follow those of the
enumerate function. To compute a sequence of results, use the
enumerate function, rather than looping and calling this method with the previous loop iteration’s result.