Returns the first moment of a given Date, as a Date.
- iOS 8.0+
- macOS 10.9+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Xcode 6.0.1+
The first moment of the given date.
For example, pass in
Date(), if you want the start of today. If there were two midnights, it returns the first. If there was none, it returns the first moment that did exist.
Determines which result to use when a time is repeated on a day in a calendar (for example, during a daylight saving transition when the times between 2:00am and 3:00am may happen twice).
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software