Initializer

init()

Creates a date value initialized to the current date and time.

Declaration

init()

See Also

Creating a Date

init(timeIntervalSinceNow: TimeInterval)

Creates a date value initialized relative to the current date and time by a given number of seconds.

init(timeInterval: TimeInterval, since: Date)

Creates a date value initialized relative to another given date by a given number of seconds.

init(timeIntervalSinceReferenceDate: TimeInterval)

Creates a date value initialized relative to 00:00:00 UTC on 1 January 2001 by a given number of seconds.

init(timeIntervalSince1970: TimeInterval)

Creates a date value initialized relative to 00:00:00 UTC on 1 January 1970 by a given number of seconds.

Beta Software

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