Skip to content

Initializer

init(timeInterval:since:)

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
Creates a date value initialized relative to another given date by a given number of seconds.
init(timeInterval: TimeInterval, since date: Date)

Parameters

timeInterval

The number of seconds to add to date. A negative value means the receiver will be earlier than date.

date

The reference date.