Type Method

dateWithTimeInterval:sinceDate:

Creates and returns a date object set to a given number of seconds from the specified date.

Declaration

+ (instancetype)dateWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date;

Parameters

seconds

The number of seconds to add to date. Use a negative argument to specify a date and time before date.

date

The date.

Return Value

An NSDate object set to seconds seconds from date.

See Also

Creating a Date

+ date

Creates and returns a new date object set to the current date and time.

+ dateWithTimeIntervalSinceNow:

Creates and returns a date object set to a given number of seconds from the current date and time.

+ dateWithTimeIntervalSinceReferenceDate:

Creates and returns a date object set to a given number of seconds from 00:00:00 UTC on 1 January 2001.

+ dateWithTimeIntervalSince1970:

Creates and returns a date object set to the given number of seconds from 00:00:00 UTC on 1 January 1970.

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