Type Property

distantFuture

A date object representing a date in the distant future.

Declaration

@property(class, readonly, copy) NSDate *distantFuture;

Return Value

An NSDate object representing a date in the distant future (in terms of centuries).

Discussion

You can pass this value when an NSDate object is required to have the date argument essentially ignored. For example, the NSWindow method nextEventMatchingMask:untilDate:inMode:dequeue: returns nil if an event specified in the event mask does not happen before the specified date. You can use the object returned by distantFuture as the date argument to wait indefinitely for the event to occur.

myEvent = [myWindow nextEventMatchingMask:myEventMask
    untilDate:[NSDate distantFuture]
    inMode:NSDefaultRunLoopMode
    dequeue:YES];

See Also

Getting Temporal Boundaries

distantPast

A date object representing a date in the distant past.