(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSDate 

Inherits From:	NSObject 

Conforms To:	NSCopying
NSObject 

Declared In:	foundation/NSDate.h 

Allocating and Initializing a Date Object 

+ (id)allocWithZone:(NSZone *)zone	Allocates an unitialized date object in zone.  Returns nil if allocation fails.
+ (NSDate *)date	Creates and returns a date object set to the current date and time.
+ (NSDate *)dateWithTimeIntervalSinceNow:(NSTimeInterval)seconds
	Creates and returns a date object set to seconds seconds from the current date and time.
+ (NSDate *)dateWithTimeIntervalSince1970:(NSTimeInterval)seconds
	Creates and returns a date object set to to seconds seconds from the reference date used by UNIXâsystems. Use a negative argument value to specify a date and time before the reference date.
+ (NSDate *)dateWithTimeIntervalSinceReferenceDate:(NSTimeInterval)seconds
	Creates and returns a date object set to to seconds seconds from the absolute reference date (the first instant of 1 January, 2001). Use a negative argument value to specify a date and time before the reference date.
+ (NSDate *)distantFuture	Creates and returns a date object that represents a date in the distant future (in terms of centuries).  You can use this object in your code as a control date, a guaranteed outer temporal limit.
+ (NSDate *)distantPast	Creates and returns a date object that represents a date in the distant past (in terms of centuries).  You can use this object in your code as a control date, a guaranteed temporal boundary.
- (id)init	Initializes a newly allocated date object  to the current date and time.
- (id)initWithString:(NSString *)description	Returns a date object with a date and time value specified by the international string-representation format: YYYY-MM-DD HH:MM:SS -HHMM, where -HHMM is a time zone offset in hours and minutes from Greenwich Mean Time.
- (NSDate *)initWithTimeInterval:(NSTimeInterval)seconds
sinceDate:(NSDate *)anotherDate	Returns a date object initialized relative to another date object by seconds (plus or minus).
- (NSDate *)initWithTimeIntervalSinceNow:(NSTimeInterval)seconds
	Returns a date object initialized relative to the current date and time by seconds (plus or minus).
- (id)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)seconds
	Returns a date object initialized relative to the reference date and time by seconds (plus or minus).

Converting to an NSCalendar Object

- (NSCalendarDate *)dateWithCalendarFormat:(NSString *)formatString
timeZone:(NSTimeZone *)timeZone	Converts the date object to an NSCalendarDate object bound to the format string formatString and the time zone timeZone.  If you specify nil after either or both of these  arguments, the default format string and time zone are assumed.

Representing Dates

- (NSString *)description	Returns a string representation of the NSDate object that conforms to the international format YYYY-MM-DD HH:MM:SS -HHMM, where -HHMM represents the time-zone offset in hours and minutes from Greenwich Mean Time (GMT).
- (NSString *)descriptionWithCalendarFormat:(NSString *)formatString
timeZone:(NSTimeZone *)aTimeZone	Returns a string representation of the NSDate object that
locale:(NSDictionary *)localeDictionary		conforms to formatString (a strftime-style date-conversion string) and that is adjusted to aTimeZone.  Included are the keys and values that represent the locale data from localeDictionary.
- (NSString *)descriptionWithLocale:(NSDictionary *)localeDictionary
	Returns a string representation of the NSDate object (see description).  Included are the key and values that represent the locale data from localeDictionary.

Adding and Getting Intervals

+ (NSTimeInterval)timeIntervalSinceReferenceDate	
	Returns the interval between the system's absolute reference date and the current date and time.  This value is less than zero until the first instant of 1 January 2001.
- addTimeInterval:(NSTimeInterval)seconds	Returns a date object that's set to a specified number of seconds relative to the receiver.
- (NSTimeInterval)timeIntervalSince1970	Returns the interval between the receiver and the reference date used by UNIXâsystems.
- (NSTimeInterval)timeIntervalSinceDate:(NSDate *)otherDate
	Returns the interval between the receiver and otherDate.
- (NSTimeInterval)timeIntervalSinceNow	Returns the interval between the receiver and the current date and time.
- (NSTimeInterval)timeIntervalSinceReferenceDate	
	Returns the interval between the receiver and the system's absolute reference date.  This value is less than zero until the first instant of 1 January 2001.

Comparing Dates

- (NSComparisonResult)compare:(NSDate *)otherDate
	Compares the receiving date to otherDate and returns NSOrderedDescending if the receiver is temporally later, NSOrderedAscending if it's temporally earlier, and NSOrderedSame if they are equal.
- (NSDate *)earlierDate:(NSDate *)otherDate	Compares the receiver date to otherDate and returns the one that's temporally earlier.
- (BOOL)isEqual:(id)otherDate	Returns YES if otherDate and the receiver are within one second of each other; otherwise, returns NO.
- (NSDate *)laterDate:(NSDate *)otherDate	Compares the receiver date to otherDate and returns the one that's temporally later.