Instance Method

initWithTimeIntervalSinceReferenceDate:

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

Declaration

- (instancetype)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti;

Parameters

seconds

The number of seconds to add to the reference date (00:00:00 UTC on 1 January 2001). A negative value means the receiver will be earlier than the reference date.

Return Value

An NSDate object initialized relative to the absolute reference date by seconds seconds.

Discussion

This method is a designated initializer for the NSDate class and is declared primarily for the use of subclasses of NSDate. When you subclass NSDate to create a concrete date class, you must override this method.

See Also

Initializing a Date

- init

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

- initWithTimeIntervalSinceNow:

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

- initWithTimeInterval:sinceDate:

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

- initWithTimeIntervalSince1970:

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

- initWithCoder:

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