Initializer

init(timeIntervalSinceNow:)

Returns a date object initialized relative to the current date and time by a given number of seconds.

Declaration

convenience init(timeIntervalSinceNow secs: TimeInterval)

Parameters

seconds

The number of seconds from relative to the current date and time to which the receiver should be initialized. A negative value means the returned object will represent a date in the past.

Return Value

An NSDate object initialized relative to the current date and time by seconds seconds.

See Also

Initializing a Date

init()

Returns a date object initialized to the current date and time.

init(timeInterval: TimeInterval, since: Date)

Returns a date object initialized relative to another given date by a given number of seconds.

init(timeIntervalSinceReferenceDate: TimeInterval)

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

init(timeIntervalSince1970: TimeInterval)

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

init?(coder: NSCoder)

Returns a date object initialized from data in the given unarchiver.

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