Returns a new
Date representing the date calculated by setting hour, minute, and second to a given time on a specified
- iOS 8.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 6.0.1+
A specified hour.
A specified minute.
A specified second.
The date to start calculation with.
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.
If no such time exists, the next available time is returned (which could, for example, be in a different day than the nominal target date). The intent is to return a date on the same day as the original date argument. This may result in a date which is backward than the given date, of course.