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

NSCalendarDate 

Inherits From:	NSDate : NSObject 

Conforms To:	NSObject
NSCopying 

Declared In:	foundation/NSDate.h 

Getting and Initializing an NSCalendar Date 

+ (NSCalendarDate *)calendarDate	Returns an NSCalendarDate initialized to the current date and time.
+ (NSCalendarDate *)dateWithString:(NSString *)description
calendarFormat:(NSString *)format	 Returns an NSCalendarDate object initialized with the date specified in description and interpreted according the the conversion specifiers in format.  Raises an exception if the description and format do not correspond exactly.
+ (NSCalendarDate *)dateWithString:(NSString *)description 
calendarFormat:(NSString *)format 	Returns an NSCalendarDate object initialized with the date
locale:(NSDictionary *)dictionary		date specified in description and interpreted according the the conversion specifiers in format.  String components of the date are fetched from the locale  dictionary.  Raises an exception if the description and format do not correspond exactly.
+ (NSCalendarDate *)dateWithYear:(int)year	Returns an NSCalendarDate object initialized with integers 
month:(unsigned int)month		that specify a year (which must include the  
day:(unsigned int)day		century), month,  day,  hour, minute, and second.  Also
hour:(unsigned int)hour		include a time-zone object or time-zone detail object   
minute:(unsigned int)minute		(aTimeZone) to have the date adjusted to a  particular
second:(unsigned int)second		 locale.  If you specify nil for a time zone, an 
timeZone:(NSTimeZone *)aTimeZone		exception is raised.  (See "Retrieving Date Elements," below, for the proper ranges of the date and time integers.)
- (id)initWithString:(NSString *)description	Initializes and returns an NSCalendarDate object specified by description in the international format for date representation (YYYY-MM-DD HH:MM:SS 
- HHMM, where - HHMM is an offset from GMT).
- (id)initWithString:(NSString *)description	Initializes and returns an NSCalendarDate object specified
calendarFormat:(NSString *)format		as a string object in description and interpreted according to the extended  strftime date-conversion specifiers in format.  Raises an exception if the description and format do not correspond exactly.
- (id)initWithString:(NSString *)description	Initializes and returns an NSCalendarDate object specified
calendarFormat:(NSString *)format		as a string object in description and interpreted
locale:(NSDictionary *)dictionary		 according to the extended  strftime date-conversion specifiers in format.  String components of the date are fetched from the locale  dictionary.  Raises an exception if the description and format do not correspond exactly.
- (id)initWithYear:(int)year	Returns an NSCalendarDate object initialized with integers
month:(unsigned int)month		that specify a year (which must include the
day:(unsigned int)day		century), month,  day,  hour, minute, and second.  Also
hour:(unsigned int)hour		include a time-zone object (aTimeZone) to have the
minute:(unsigned int)minute		date adjusted for a particular locale.  If you specify nil
second:(unsigned int)second		for a time zone, an exception is raised.  (See "Retrieving
timeZone:(NSTimeZone *)aTimeZone		Date Elements," below, for the proper ranges of the date and time integers.)

Retrieving Date Elements

- (int)dayOfCommonEra	Returns the number of days since the beginning of the Common Era.
- (int)dayOfMonth	Returns the day of the month (1 through 31) of the NSCalendarDate object.
- (int)dayOfWeek	Returns a number indicating the day of the week (0 [Sun] through 6 [Sat]) of the NSCalendarDate object.
- (int)dayOfYear	Returns a number indicating the day of the year (1 through 366) of the NSCalendarDate object.
- (int)hourOfDay	Returns a number indicating the hour of the day (0 through 23) of the NSCalendarDate object.
- (int)minuteOfHour	Returns a number indicating the minute of the hour (0 through 59) of the NSCalendarDate object.
- (int)monthOfYear	Returns a number indicating the month of the year (1 through 12) of the NSCalendarDate object.
- (int)secondOfMinute	Returns a number indicating the second of the minute (0 through 59) of the NSCalendarDate object.
- (int)yearOfCommonEra	Returns a number indicating the year, including the century,  of the NSCalendarDate object.

Providing Adjusted Dates 

- (NSCalendarDate *)addYear:(int)year	Returns an NSCalendarDate objects with the year, month, 
month:(int)month		day, hour, minute, and second offsets specified as 
day:(int)day		arguments and the correct time-zone detail object for
hour:(int)hour		the computed date.  These offsets are relative to the
minute:(int)minute		object and can be positive or negative.  This method
second:(int)second		preserves "clock time" during transitions to and from 
		Daylight Savings Time and on leap years.

Getting String Descriptions of Dates 

- (NSString *)description	Returns a string object representing the NSCalendarDate object according to the default format string for the object.
- (NSString *)descriptionWithCalendarFormat:(NSString *)format	
	Returns a string representation of  the NSCalendarDate that is formatted according to the conversion specifiers in the format string object using the time-zone detail object.
- (NSString *)descriptionWithCalendarFormat:(NSString *)format	
locale:(NSDictionary *)locale	Returns a string representation of  the NSCalendarDate that is formatted according to the conversion specifiers in the format string object and that uses localized date string objects contained in the dictionary locale.
- (NSString *)descriptionWithLocale:(NSDictionary *)locale
	Returns a string representation of  the NSCalendarDate that  uses localized date string objects contained in the dictionary locale.  Uses the receiving NSCalendarDate object's time zone and format.

Getting and Setting Calendar Formats 

- (NSString *)calendarFormat	Returns the calendar format for the receiving object (a string of date-conversion specifiers).  The default calendar format (if none other is set) is @"%y-%m-%d %H:%M:%S %z".
- (void)setCalendarFormat:(NSString *)format	Sets the calendar format for the receiving object to format. 

Getting and Setting Time Zones 

- (void)setTimeZone:(NSTimeZone *)timeZone	Sets the time-zone object associated with the NSCalendarDate object to timeZone.
- (NSTimeZoneDetail *)timeZoneDetail	Returns the time-zone detail object associated with the NSCalendarDate object.