![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/gnustep-base-doc/Base/Reference/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>NSCalendarDate class reference</title> </head> <body> <font face="serif"> <a href="Base.html">Up</a> <br /> <h1><a name="title$NSCalendarDate">NSCalendarDate class reference</a></h1> <h3>Authors</h3> <dl> <dt>Scott Christley (<a href="mailto:scottc@net-community.com"><code>scottc@net-community.com</code></a>)</dt> <dd> </dd> <dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt> <dd> </dd> </dl> <p><b>Copyright:</b> (C) 1996, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. </p> <div> <hr width="50%" align="left" /> <h3>Contents -</h3> <ol> <li> <a href="#001000000000">Software documentation for the NSCalendarDate class</a> </li> <li> <a href="#002000000000">Software documentation for the NSCalendarDate(GregorianDate) category</a> </li> <li> <a href="#003000000000">Software documentation for the NSCalendarDate(OPENSTEP) category</a> </li> </ol> <hr width="50%" align="left" /> </div> <h1><a name="001000000000"> Software documentation for the NSCalendarDate class </a></h1> <h2><a name="class$NSCalendarDate">NSCalendarDate</a> : <a rel="gsdoc" href="NSDate.html#class$NSDate">NSDate</a></h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSCalendarDate.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> An <a rel="gsdoc" href="NSDate.html#class$NSDate">NSDate</a> subclass which understands about timezones and provides methods for dealing with date and time information by calendar and with hours minutes and seconds. </div> <hr width="50%" align="left" /> <a href="#_NSCalendarDate_ivars">Instance Variables</a> <br/><br/> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(GregorianDate)-absoluteGregorianDay$month$year$">-absoluteGregorianDay:month:year:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(GregorianDate)-gregorianDateFromAbsolute$day$month$year$">-gregorianDateFromAbsolute:day:month:year:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(GregorianDate)-lastDayOfGregorianMonth$year$">-lastDayOfGregorianMonth:year:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(OPENSTEP)-dateByAddingYears$months$days$hours$minutes$seconds$">-dateByAddingYears:months:days:hours:minutes:seconds:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(OPENSTEP)-years$months$days$hours$minutes$seconds$sinceDate$">-years:months:days:hours:minutes:seconds:sinceDate:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate+calendarDate">+calendarDate</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate+dateWithString$calendarFormat$">+dateWithString:calendarFormat:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate+dateWithString$calendarFormat$locale$">+dateWithString:calendarFormat:locale:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate+dateWithYear$month$day$hour$minute$second$timeZone$">+dateWithYear:month:day:hour:minute:second:timeZone:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-addYear$month$day$hour$minute$second$">-addYear:month:day:hour:minute:second:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-calendarFormat">-calendarFormat</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-dayOfCommonEra">-dayOfCommonEra</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-dayOfMonth">-dayOfMonth</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-dayOfWeek">-dayOfWeek</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-dayOfYear">-dayOfYear</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-description">-description</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-descriptionWithCalendarFormat$">-descriptionWithCalendarFormat:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-descriptionWithCalendarFormat$locale$">-descriptionWithCalendarFormat:locale:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-descriptionWithLocale$">-descriptionWithLocale:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-hourOfDay">-hourOfDay</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-initWithString$">-initWithString:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-initWithString$calendarFormat$">-initWithString:calendarFormat:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-initWithString$calendarFormat$locale$">-initWithString:calendarFormat:locale:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-initWithYear$month$day$hour$minute$second$timeZone$">-initWithYear:month:day:hour:minute:second:timeZone:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-minuteOfHour">-minuteOfHour</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-monthOfYear">-monthOfYear</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-secondOfMinute">-secondOfMinute</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-setCalendarFormat$">-setCalendarFormat:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-setTimeZone$">-setTimeZone:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-timeZone">-timeZone</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-timeZoneDetail">-timeZoneDetail</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate-yearOfCommonEra">-yearOfCommonEra</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSCalendarDate+calendarDate">calendarDate </a></h3> + (id) <b>calendarDate</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return an NSCalendarDate for the current date and time using the default timezone. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate+dateWithString$calendarFormat$">dateWithString: calendarFormat: </a></h3> + (id) <b>dateWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)description<b> calendarFormat:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)format;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return an NSCalendarDate generated from the supplied <var>description</var> using the <var>format</var> specified for parsing that string. <br /> Calls <a rel="gsdoc" href="#method$NSCalendarDate-initWithString$calendarFormat$"> -initWithString:calendarFormat: </a> to create the date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate+dateWithString$calendarFormat$locale$">dateWithString: calendarFormat: locale: </a></h3> + (id) <b>dateWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)description<b> calendarFormat:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)format<b> locale:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)dictionary;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return an NSCalendarDate generated from the supplied <var>description</var> using the <var>format</var> specified for parsing that string and interpreting it according to the <var>dictionary</var> specified. <br /> Calls <a rel="gsdoc" href="#method$NSCalendarDate-initWithString$calendarFormat$locale$">-initWithString:calendarFormat:locale:</a> to create the date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate+dateWithYear$month$day$hour$minute$second$timeZone$">dateWithYear: month: day: hour: minute: second: timeZone: </a></h3> + (id) <b>dateWithYear:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)year<b> month:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)month<b> day:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)day<b> hour:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)hour<b> minute:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)minute<b> second:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)second<b> timeZone:</b> (<a rel="gsdoc" href="NSTimeZone.html#class$NSTimeZone">NSTimeZone</a>*)aTimeZone;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Creates and returns an NSCalendarDate from the specified values by calling <a rel="gsdoc" href="#method$NSCalendarDate-initWithYear$month$day$hour$minute$second$timeZone$">-initWithYear:month:day:hour:minute:second:timeZone:</a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-addYear$month$day$hour$minute$second$">addYear: month: day: hour: minute: second: </a></h3> - (<a rel="gsdoc" href="#class$NSCalendarDate">NSCalendarDate</a>*) <b>addYear:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)year<b> month:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)month<b> day:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)day<b> hour:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)hour<b> minute:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)minute<b> second:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)second;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> </p> <p> Returns a calendar date formed by adding the specified offsets to the receiver. The offsets are added in order, years, then months, then days, then hours then minutes then seconds, so if you add 1 <var>month</var> and forty days to 20th September, the result will be 9th November. </p> <p> </p> <p> This method understands leap years and tries to adjust for daylight savings time changes so that it preserves expected clock time. </p> <p> </p> <p> The returned date has the calendar format and timezone of the receiver. </p> <p> This method exists solely for conformance to the OpenStep spec. Its use is deprecated... it simply calls <a rel="gsdoc" href="#method$NSCalendarDate(OPENSTEP)-dateByAddingYears$months$days$hours$minutes$seconds$">-dateByAddingYears:months:days:hours:minutes:seconds:</a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-calendarFormat">calendarFormat </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>calendarFormat</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns the format string associated with the receiver. <br /> See <a rel="gsdoc" href="#method$NSCalendarDate-descriptionWithCalendarFormat$locale$">-descriptionWithCalendarFormat:locale:</a> for details. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-dayOfCommonEra">dayOfCommonEra </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>dayOfCommonEra</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the day number (ie number of days since the start of) in the 'common' era of the receiving date. The era starts at 1 A.D. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-dayOfMonth">dayOfMonth </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>dayOfMonth</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the month (1 to 31) of the receiving date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-dayOfWeek">dayOfWeek </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>dayOfWeek</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the day of the week (0 to 6) of the receiving date. <ul> <li> 0 is sunday </li> <li> 1 is monday </li> <li> 2 is tuesday </li> <li> 3 is wednesday </li> <li> 4 is thursday </li> <li> 5 is friday </li> <li> 6 is saturday </li> </ul> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-dayOfYear">dayOfYear </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>dayOfYear</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the day of the year (1 to 366) of the receiving date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-description">description </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>description</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Calls <a rel="gsdoc" href="#method$NSCalendarDate-descriptionWithCalendarFormat$locale$">-descriptionWithCalendarFormat:locale:</a> passing the receiver's calendar format and a <code>nil</code> locale. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-descriptionWithCalendarFormat$">descriptionWithCalendarFormat: </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>descriptionWithCalendarFormat:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)format;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns a string representation of the receiver using the specified <var>format</var> string. <br /> Calls <a rel="gsdoc" href="#method$NSCalendarDate-descriptionWithCalendarFormat$locale$">-descriptionWithCalendarFormat:locale:</a> with a <code>nil</code> locale. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-descriptionWithCalendarFormat$locale$">descriptionWithCalendarFormat: locale: </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>descriptionWithCalendarFormat:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)format<b> locale:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)locale;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns a string representation of the receiver using the specified <var>format</var> string and <var>locale</var> dictionary. <br /> Format specifiers are - <ul> <li> %a abbreviated weekday name according to <var>locale</var> </li> <li> %A full weekday name according to <var>locale</var> </li> <li> %b abbreviated month name according to <var>locale</var> </li> <li> %c this is the same as %X %x </li> <li> %B full month name according to <var>locale</var> </li> <li> %d day of month as two digit decimal number (leading zero) </li> <li> %e day of month as decimal number (without leading zero) </li> <li> %F milliseconds (000 to 999) </li> <li> %H hour as a decimal number using 24-hour clock </li> <li> %I hour as a decimal number using 12-hour clock </li> <li> %j day of year as a decimal number </li> <li> %k same as %H with leading space instead of zero </li> <li> %m month as decimal number </li> <li> %M minute as decimal number </li> <li> %p 'am' or 'pm' </li> <li> %S second as decimal number </li> <li> %U week of the current year as decimal number (Sunday first day) </li> <li> %W week of the current year as decimal number (Monday first day) </li> <li> %w day of the week as decimal number (Sunday = 0) </li> <li> %x date formatted according to the <var>locale</var> </li> <li> %X time formatted according to the <var>locale</var> </li> <li> %y year as a decimal number without century (minimum 0) </li> <li> %Y year as a decimal number with century, minimum 0, maximum 9999 </li> <li> %z time zone offset (HHMM) </li> <li> %Z time zone </li> <li> %% literal % character </li> </ul> </p> <p> NB. If GSMacOSCompatible is set to <code>YES</code>, the %k specifier is not recognized. </p> <p> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-descriptionWithLocale$">descriptionWithLocale: </a></h3> - (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*) <b>descriptionWithLocale:</b> (id)locale;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns a description of the receiver using its normal format but with the specified <var>locale</var> dictionary. <br /> Calls <a rel="gsdoc" href="#method$NSCalendarDate-descriptionWithCalendarFormat$locale$">-descriptionWithCalendarFormat:locale:</a> to do this. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-hourOfDay">hourOfDay </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>hourOfDay</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the hour of the day (0 to 23) of the receiving date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-initWithString$">initWithString: </a></h3> - (id) <b>initWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)description;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Initializes an NSCalendarDate using the specified <var>description</var> and the default calendar format and locale. <br /> Calls <a rel="gsdoc" href="#method$NSCalendarDate-initWithString$calendarFormat$locale$">-initWithString:calendarFormat:locale:</a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-initWithString$calendarFormat$">initWithString: calendarFormat: </a></h3> - (id) <b>initWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)description<b> calendarFormat:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)format;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Initializes an NSCalendarDate using the specified <var>description</var> and <var>format</var> string interpreted in the default locale. <br /> Calls <a rel="gsdoc" href="#method$NSCalendarDate-initWithString$calendarFormat$locale$">-initWithString:calendarFormat:locale:</a> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-initWithString$calendarFormat$locale$">initWithString: calendarFormat: locale: </a></h3> - (id) <b>initWithString:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)description<b> calendarFormat:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)fmt<b> locale:</b> (<a rel="gsdoc" href="NSDictionary.html#class$NSDictionary">NSDictionary</a>*)locale;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Initializes an NSCalendarDate using the specified <var>description</var> and format string interpreted in the given <var>locale</var>. <br /> If <var>description</var> does not match <var>fmt</var> exactly, this method returns <code>nil</code>. <br /> Excess characters in the <var>description</var> (after the format is matched) are ignored. <br /> Format specifiers are - <ul> <li> %% literal % character </li> <li> %a abbreviated weekday name according to <var>locale</var> </li> <li> %A full weekday name according to <var>locale</var> </li> <li> %b abbreviated month name according to <var>locale</var> </li> <li> %B full month name according to <var>locale</var> </li> <li> %c same as '%X %x' </li> <li> %d day of month as a two digit decimal number </li> <li> %e same as %d without leading zero </li> <li> %F milliseconds as a decimal number </li> <li> %H hour as a decimal number using 24-hour clock </li> <li> %I hour as a decimal number using 12-hour clock </li> <li> %j day of year as a decimal number </li> <li> %k same as %H without leading zero (leading space is used instead) </li> <li> %m month as decimal number </li> <li> %M minute as decimal number </li> <li> %p 'am' or 'pm' </li> <li> %S second as decimal number </li> <li> %U week of the current year as decimal number (Sunday first day) </li> <li> %W week of the current year as decimal number (Monday first day) </li> <li> %w day of the week as decimal number (Sunday = 0) </li> <li> %x date with date representation for <var>locale</var> </li> <li> %X time with time representation for <var>locale</var> </li> <li> %y year as a decimal number without century </li> <li> %Y year as a decimal number with century </li> <li> %z time zone offset in hours and minutes from GMT (HHMM) </li> <li> %Z time zone abbreviation </li> </ul> If no year is specified in the format, the current year is assumed. <br /> If no month is specified in the format, January is assumed. <br /> If no day is specified in the format, 1 is assumed. <br /> If no hour is specified in the format, 0 is assumed. <br /> If no minute is specified in the format, 0 is assumed. <br /> If no second is specified in the format, 0 is assumed. <br /> If no millisecond is specified in the format, 0 is assumed. <br /> If no timezone is specified in the format, the local timezone is assumed. </p> <p> If GSMacOSXCompatible is <code>YES</code>, the %k specifier is not recognized. </p> <p> </p> <p> NB. Where the format calls for a numeric value and the string contains fewer digits than expected, the value will be accepted and left padded with zeros to the expected size. <br /> For instance, the '%z' format implies four digits (two for the hour offset and two for the digit offset) and if the string contains '01' it will be treated as '0001' ie. a timezone offset of 1 minute. <br /> Similarly, the '%F' format implies three digits, so a value of '1' would be treated as '001' or 1 millisecond, not a tenth of a second (as you might assume as '%F' is usually used after a decimal separator). </p> <p> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-initWithYear$month$day$hour$minute$second$timeZone$">initWithYear: month: day: hour: minute: second: timeZone: </a></h3> - (id) <b>initWithYear:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)year<b> month:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)month<b> day:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)day<b> hour:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)hour<b> minute:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)minute<b> second:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>)second<b> timeZone:</b> (<a rel="gsdoc" href="NSTimeZone.html#class$NSTimeZone">NSTimeZone</a>*)aTimeZone;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Returns an NSCalendarDate instance with the given <var>year</var>, <var>month</var>, <var>day</var>, <var>hour</var>, <var>minute</var>, and <var>second</var>, using <var>aTimeZone</var>. <br /> The <var>year</var> includes the century (ie you can't just say '02' when you mean '2002'). <br /> The <var>month</var> is in the range 1 to 12, <br /> The <var>day</var> is in the range 1 to 31, <br /> The <var>hour</var> is in the range 0 to 23, <br /> The <var>minute</var> is in the range 0 to 59, <br /> The <var>second</var> is in the range 0 to 59. <br /> If <var>aTimeZone</var> is <code>nil</code>, the <a rel="gsdoc" href="NSTimeZone.html#method$NSTimeZone+localTimeZone"> [NSTimeZone +localTimeZone] </a> value is used. </p> <p> GNUstep checks the validity of the method arguments, and unless the base library was built with 'warn=no' it generates a warning for bad values. It tries to use those bad values to generate a date anyway though, rather than failing (this also appears to be the behavior of MacOS-X). </p> <p> The algorithm GNUstep uses to create the date is this ... <br /> <ul> <li> Convert the broken out date values into a time interval since the reference date, as if those values represent a GMT date/time. </li> <li> Ask the time zone for the offset from GMT at the resulting date, and apply that offset to the time interval... so get the value for the specified timezone. </li> <li> Ask the time zone for the offset from GMT at the new date... in case the new date is in a different daylight savings time band from the original date. If this offset differs from the previous one, apply the difference so that the result is corrected for daylight savings. This is the final result used. </li> <li> After establishing the time interval we will use and completing initialisation, we ask the time zone for the offset from GMT again. If it is not the same as the last time, then the time specified by the broken out date does not really exist... since it's in the period lost by the transition to daylight savings. The resulting date is therefore not the date that was actually asked for, but is the best approximation we can do. If the base library was not built with 'warn=no' then a warning message is logged for this condition. </li> </ul> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-minuteOfHour">minuteOfHour </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>minuteOfHour</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the minute of the hour (0 to 59) of the receiving date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-monthOfYear">monthOfYear </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>monthOfYear</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the month of the year (1 to 12) of the receiving date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-secondOfMinute">secondOfMinute </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>secondOfMinute</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the second of the minute (0 to 59) of the receiving date. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-setCalendarFormat$">setCalendarFormat: </a></h3> - (void) <b>setCalendarFormat:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)format;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Sets the <var>format</var> string associated with the receiver. <br /> Providing a <code>nil</code> argument sets the default calendar <var>format</var>. <br /> See <a rel="gsdoc" href="#method$NSCalendarDate-descriptionWithCalendarFormat$locale$">-descriptionWithCalendarFormat:locale:</a> for details. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-setTimeZone$">setTimeZone: </a></h3> - (void) <b>setTimeZone:</b> (<a rel="gsdoc" href="NSTimeZone.html#class$NSTimeZone">NSTimeZone</a>*)aTimeZone;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Sets the time zone associated with the receiver. <br /> Providing a <code>nil</code> argument sets the local time zone. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-timeZone">timeZone </a></h3> - (<a rel="gsdoc" href="NSTimeZone.html#class$NSTimeZone">NSTimeZone</a>*) <b>timeZone</b>;<br /> <div class="availability"> <b>Availability:</b> MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the time zone associated with the receiver. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-timeZoneDetail">timeZoneDetail </a></h3> - (<a rel="gsdoc" href="NSTimeZone.html#class$NSTimeZoneDetail">NSTimeZoneDetail</a>*) <b>timeZoneDetail</b>;<br /> <div class="availability"> <b>Availability:</b> OPENSTEP 4.0.0 removed at MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the time zone detail associated with the receiver. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate-yearOfCommonEra">yearOfCommonEra </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>yearOfCommonEra</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> Return the year of the 'common' era of the receiving date. The era starts at 1 A.D. </div> <hr width="25%" align="left" /> </div> <a name="_NSCalendarDate_ivars"/> <br/><hr width="50%" align="left" /> <h2>Instance Variables for NSCalendarDate Class</h2> <h3><a name="ivariable$NSCalendarDate*_calendar_format">_calendar_format</a></h3> @protected NSString* <b>_calendar_format</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$NSCalendarDate*_seconds_since_ref">_seconds_since_ref</a></h3> @protected NSTimeInterval <b>_seconds_since_ref</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <h3><a name="ivariable$NSCalendarDate*_time_zone">_time_zone</a></h3> @protected NSTimeZone* <b>_time_zone</b>;<br /> <div class="availability"> <b>Availability:</b> OpenStep</div> <br /> <div class="desc"> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </div> <hr width="25%" align="left" /> <br/><hr width="50%" align="left" /><br/> <h1><a name="002000000000"> Software documentation for the NSCalendarDate(GregorianDate) category </a></h1> <h2><a rel="gsdoc" href="#class$NSCalendarDate">NSCalendarDate</a>(<a name="category$NSCalendarDate(GregorianDate)">GregorianDate</a>)</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSCalendarDate.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Routines for manipulating Gregorian dates. </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(GregorianDate)-absoluteGregorianDay$month$year$">-absoluteGregorianDay:month:year:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(GregorianDate)-gregorianDateFromAbsolute$day$month$year$">-gregorianDateFromAbsolute:day:month:year:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(GregorianDate)-lastDayOfGregorianMonth$year$">-lastDayOfGregorianMonth:year:</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSCalendarDate(GregorianDate)-absoluteGregorianDay$month$year$">absoluteGregorianDay: month: year: </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>absoluteGregorianDay:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)day<b> month:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)month<b> year:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)year;<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Returns the number of days since the start of the era for the specified <var>day</var>, <var>month</var>, and <var>year</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate(GregorianDate)-gregorianDateFromAbsolute$day$month$year$">gregorianDateFromAbsolute: day: month: year: </a></h3> - (void) <b>gregorianDateFromAbsolute:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)d<b> day:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)day<b> month:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)month<b> year:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)year;<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Given a <var>day</var> number since the start of the era, returns the date as a <var>day</var>, <var>month</var>, and <var>year</var>. </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate(GregorianDate)-lastDayOfGregorianMonth$year$">lastDayOfGregorianMonth: year: </a></h3> - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>) <b>lastDayOfGregorianMonth:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)month<b> year:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)year;<br /> <div class="availability"> <b>Availability:</b> Not in OpenStep/MacOS-X</div> <br /> <div class="desc"> Returns the number of the last day of the <var>month</var> in the specified <var>year</var>. </div> <hr width="25%" align="left" /> </div> <h1><a name="003000000000"> Software documentation for the NSCalendarDate(OPENSTEP) category </a></h1> <h2><a rel="gsdoc" href="#class$NSCalendarDate">NSCalendarDate</a>(<a name="category$NSCalendarDate(OPENSTEP)">OPENSTEP</a>)</h2> <blockquote class="declared"> <dl> <dt><b>Declared in:</b></dt> <dd>Foundation/NSCalendarDate.h</dd> </dl> </blockquote> <div class="availability"> <b>Availability:</b> OPENSTEP 4.0.0 removed at MacOS-X 10.0.0</div> <br /> <div class="desc"> Methods present in OpenStep but later removed from MacOS-X. </div> <b>Method summary</b> <ul> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(OPENSTEP)-dateByAddingYears$months$days$hours$minutes$seconds$">-dateByAddingYears:months:days:hours:minutes:seconds:</a></li> <li><a rel="gsdoc" href="NSCalendarDate.html#method$NSCalendarDate(OPENSTEP)-years$months$days$hours$minutes$seconds$sinceDate$">-years:months:days:hours:minutes:seconds:sinceDate:</a></li> </ul> <hr width="50%" align="left" /> <div class="method"> <h3><a name="method$NSCalendarDate(OPENSTEP)-dateByAddingYears$months$days$hours$minutes$seconds$">dateByAddingYears: months: days: hours: minutes: seconds: </a></h3> - (<a rel="gsdoc" href="#class$NSCalendarDate">NSCalendarDate</a>*) <b>dateByAddingYears:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)years<b> months:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)months<b> days:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)days<b> hours:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)hours<b> minutes:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)minutes<b> seconds:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>)seconds;<br /> <div class="availability"> <b>Availability:</b> OPENSTEP 4.0.0 removed at MacOS-X 10.0.0</div> <br /> <div class="desc"> <em>Description forthcoming.</em> </div> <hr width="25%" align="left" /> </div> <div class="method"> <h3><a name="method$NSCalendarDate(OPENSTEP)-years$months$days$hours$minutes$seconds$sinceDate$">years: months: days: hours: minutes: seconds: sinceDate: </a></h3> - (void) <b>years:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)years<b> months:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)months<b> days:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)days<b> hours:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)hours<b> minutes:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)minutes<b> seconds:</b> (<a rel="gsdoc" href="TypesAndConstants.html#type$NSInteger">NSInteger</a>*)seconds<b> sinceDate:</b> (<a rel="gsdoc" href="NSDate.html#class$NSDate">NSDate</a>*)date;<br /> <div class="availability"> <b>Availability:</b> OPENSTEP 4.0.0 removed at MacOS-X 10.0.0</div> <br /> <div class="desc"> Returns the number of <var>years</var>, <var>months</var>, <var>days</var>, <var>hours</var>, <var>minutes</var>, and <var>seconds</var> between the receiver and the given <var>date</var>. <br /> If <var>date</var> is in the future of the receiver, the returned values will be negative (or zero), otherwise they are all positive. <br /> If any of the pointers to return value in is null, the corresponding value will not be returned, and other return values will be adjusted accordingly. eg. If a difference of 1 hour was to be returned but <var>hours</var> is null, then the value returned in <var>minutes</var> will be increased by 60. </div> <hr width="25%" align="left" /> </div> <br /> <a href="Base.html">Up</a> </font> </body> </html>