Creates and returns a date object set to a given number of seconds from the current date and time.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
+ (instancetype)dateWithTimeIntervalSinceNow:(NSTime Interval)secs;
Parameters
seconds
The number of seconds from the current date and time for the new date. Use a negative value to specify a date before the current date.
Return Value
An NSDate
object set to seconds
seconds from the current date and time.