home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / NeXTanswers / OpenStepSpec_rtf / FoundationKit / Classes / NSCalendarDate.rtf < prev    next >
Encoding:
Text File  |  1994-07-01  |  10.6 KB  |  130 lines

  1. {\rtf0\ansi\paperw16228 \paperh18648 \margl-907 \margr0 \margt0 \margb0 {\fonttbl\f0\fswiss Helvetica;\f1\froman Times;\f2\fmodern Courier;\f3\ftech Symbol;\f4\froman Palatino;}
  2. {\stylesheet{\s0 \li100 \fi0 \ri1007 \ql   1Head;}
  3. {\s1 \li100 \fi0 \ri1007 \ql   ClassName;}
  4. {\s2 \li2872 \fi-2771 \ri1007 \ql \tx2872   ConformsTo;}
  5. {\s3 \li2872 \fi-2771 \ri1007 \ql   DeclaredIn;}
  6. {\s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030   Description;}
  7. {\s5 \li7030 \fi-5796 \ri1007 \ql   DescriptionPart;}
  8. {\s6 \li0 \fi0 \ri0 \ql \tx-25 \tx8290 \tx9172   Footer;}
  9. {\s7 \li2872 \fi-2771 \ri1007 \ql \tx2872   InheritsFrom;}
  10. {\s8 \li100 \fi0 \ri1007 \ql   Summary;}
  11. }
  12. \li0 \fi0 \ri0 \ql \sb0 \f1 \fs24 
  13. (Preliminary Documentation) Copyright \f3 \'e3\f1 1994 by NeXT Computer, Inc.  All Rights Reserved.\
  14. \
  15. \s0 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  16. \
  17. \
  18. \
  19. \
  20. \
  21. \
  22. \fs36 NSCalendarDate \
  23. \pard \s7 \li2872 \fi-2771 \ri1007 \ql \tx2872 \f1 \b0 \fs28 \fs16 \
  24. \
  25. \
  26. \fs28 \f0 \b \fs28 Inherits From:    \b0 \fs28 \f1 NSDate : NSObject \
  27. \fs16 \
  28. \fs28 \s2 \fs16 \fs28 \f0 \b \fs28 Conforms To:    \b0 \fs28 \f1 NSObject\
  29. \fi0 NSCopying \
  30. \fs16 \
  31. \fs28 \s3 \fi-2771 \fs16 \fs28 \f0 \b \fs28 Declared In:    \b0 \fs28 \f1 foundation/NSDate.h \
  32. \fs16 \
  33. \fs28 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs28 \fs16 \
  34. \
  35. \fs28 Getting and Initializing an NSCalendar Date \
  36. \fs16 \
  37. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 + (NSCalendarDate *)\b calendarDate\b0     Returns an NSCalendarDate initialized to the current date and time.\
  38. \fi-6552 \fi-6552 \fi-6552 + (NSCalendarDate *)\b dateWithString:\b0 (NSString *)\i description\
  39. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0 \b calendarFormat:\b0 (NSString *)\i format\i0      Returns an NSCalendarDate object initialized with the date specified in \i description\i0  and interpreted according the the conversion specifiers in \i format\i0 .  Raises an exception if the \i description\i0  and \i format\i0  do not correspond exactly.\
  40. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (NSCalendarDate *)\b dateWithString:\b0 (NSString *)\i description\i0  \
  41. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b calendarFormat:\b0 (NSString *)\i format\i0      Returns an NSCalendarDate object initialized with the date\
  42. \b locale:\b0 (NSDictionary *)\i dictionary        \i0 date specified in \i description\i0  and interpreted according the the conversion specifiers in \i format\i0 .  String components of the date are fetched from the locale  \i dictionary\i0 .  Raises an exception if the \i description\i0  and \i format\i0  do not correspond exactly.\
  43. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (NSCalendarDate *)\b dateWithYear:\b0 (int)\i year\i0     Returns an NSCalendarDate object initialized with integers \
  44. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b month:\b0 (unsigned int)\i month\i0         that specify a \i year\i0  (which must include the  \
  45. \b day:\b0 (unsigned int)\i day\i0         century), \i month\i0 ,  \i day\i0 ,  \i hour\i0 , \i minute\i0 , and \i second\i0 .  Also\
  46. \b hour:\b0 (unsigned int)\i hour\i0         include a time-zone object or time-zone detail object   \
  47. \b minute:\b0 (unsigned int)\i minute\i0         (\i aTimeZone\i0 ) to have the date adjusted to a  particular\
  48. \b second:\b0 (unsigned int)\i second\i0          locale.  If you specify \b nil\b0  for a time zone, an \
  49. \b timeZone\b0 :(NSTimeZone *)\i aTimeZone        \i0 exception is raised.\i   \i0 (See "Retrieving Date Elements," below, for the proper ranges of the date and time integers.)\
  50. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (id)\b initWithString:\b0 (NSString *)\i description\i0     Initializes and returns an NSCalendarDate object specified by \i description\i0  in the international format for date representation (YYYY-MM-DD HH:MM:SS \
  51. \fi0 \f3 {\f3 -}\f1  HHMM, where \f3 {\f3 -}\f1  HHMM is an offset from GMT).\
  52. \fi-6552 \fi-6552 {\f3 -} (id)\b initWithString:\b0 (NSString *)\i description\i0     Initializes and returns an NSCalendarDate object specified\
  53. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b calendarFormat:\b0 (NSString *)\i format\i0         as a string object in \i description\i0  and interpreted according to the extended  \b strftime \b0 date-conversion specifiers in \i format\i0 .  Raises an exception if the \i description\i0  and \i format\i0  do not correspond exactly.\
  54. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (id)\b initWithString:\b0 (NSString *)\i description\i0     Initializes and returns an NSCalendarDate object specified\
  55. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b calendarFormat:\b0 (NSString *)\i format\i0         as a string object in \i description\i0  and interpreted\
  56. \b locale:\b0 (NSDictionary *)\i dictionary\i0          according to the extended  \b strftime \b0 date-conversion specifiers in \i format\i0 .  String components of the date are fetched from the locale  \i dictionary\i0 .  Raises an exception if the \i description\i0  and \i format\i0  do not correspond exactly.\
  57. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (id)\b initWithYear:\b0 (int)\i year\i0     Returns an NSCalendarDate object initialized with integers\
  58. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b month:\b0 (unsigned int)\i month\i0         that specify a \i year\i0  (which must include the\
  59. \b day:\b0 (unsigned int)\i day\i0         century), \i month\i0 ,  \i day\i0 ,  \i hour\i0 , \i minute\i0 , and \i second\i0 .  Also\
  60. \b hour:\b0 (unsigned int)\i hour\i0         include a time-zone object (\i aTimeZone\i0 ) to have the\
  61. \b minute:\b0 (unsigned int)\i minute\i0         date adjusted for a particular locale.  If you specify \b nil\
  62. \b0 \b second:\b0 (unsigned int)\i second\i0         for a time zone, an exception is raised.  (See "Retrieving\
  63. \b timeZone\b0 :(NSTimeZone *)\i aTimeZone\i0         Date Elements," below, for the proper ranges of the date and time integers.)\
  64. \
  65. \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  66. \
  67. \
  68. \fs28 Retrieving Date Elements\
  69. \fs16 \
  70. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (int)\b dayOfCommonEra\b0     Returns the number of days since the beginning of the Common Era.\
  71. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b dayOfMonth\b0     Returns the day of the month (1 through 31) of the NSCalendarDate object.\
  72. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b dayOfWeek\b0     Returns a number indicating the day of the week (0 [Sun] through 6 [Sat]) of the NSCalendarDate object.\
  73. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b dayOfYear\b0     Returns a number indicating the day of the year (1 through 366) of the NSCalendarDate object.\
  74. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b hourOfDay\b0     Returns a number indicating the hour of the day (0 through 23) of the NSCalendarDate object.\
  75. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b minuteOfHour\b0     Returns a number indicating the minute of the hour (0 through 59) of the NSCalendarDate object.\
  76. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b monthOfYear\b0     Returns a number indicating the month of the year (1 through 12) of the NSCalendarDate object.\
  77. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b secondOfMinute\b0     Returns a number indicating the second of the minute (0 through 59) of the NSCalendarDate object.\
  78. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b yearOfCommonEra\b0     Returns a number indicating the year, including the century,  of the NSCalendarDate object.\
  79. \fi-6552 \fi-6552 \fi-6552 \
  80. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  81. \
  82. \
  83. \fs28 Providing Adjusted Dates \
  84. \fs16 \
  85. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSCalendarDate *)\b addYear:\b0 (int)\i year\i0     Returns an NSCalendarDate objects with the \i year\i0 , \i month\i0 , \
  86. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b month:\b0 (int)\i month\i0         \i day\i0 , \i hour\i0 , \i minute\i0 , and \i second\i0  offsets specified as \
  87. \b day:\b0 (int)\i day\i0         arguments and the correct time-zone detail object for\
  88. \b hour:\b0 (int)\i hour\i0         the computed date.  These offsets are relative to the\
  89. \b minute:\b0 (int)\i minute\i0         object and can be positive or negative.  This method\
  90. \b second:\b0 (int)\i second\i0         preserves "clock time" during transitions to and from \
  91.         Daylight Savings Time and on leap years.\
  92. \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  93. \
  94. \
  95. \fs28 Getting String Descriptions of Dates \
  96. \fs16 \
  97. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSString *)\b description\b0     Returns a string object representing the NSCalendarDate object according to the default format string for the object.\
  98. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSString *)\b descriptionWithCalendarFormat:\b0 (NSString *)\i format\i0     \
  99. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796     Returns a string representation of  the NSCalendarDate that is formatted according to the conversion specifiers in the \i format\i0  string object using the time-zone detail object.\
  100. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (NSString *)\b descriptionWithCalendarFormat:\b0 (NSString *)\i format\i0     \
  101. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b locale:\b0 (NSDictionary *)\i locale\i0     Returns a string representation of  the NSCalendarDate that is formatted according to the conversion specifiers in the \i format\i0  string object and that uses localized date string objects contained in the dictionary \i locale\i0 .\
  102. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (NSString *)\b descriptionWithLocale:\b0 (NSDictionary *)\i locale\
  103. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Returns a string representation of  the NSCalendarDate that  uses localized date string objects contained in the dictionary \i locale\i0 .  Uses the receiving NSCalendarDate object\'27s time zone and format.\
  104. \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  105. \
  106. \
  107. \fs28 Getting and Setting Calendar Formats \
  108. \fs16 \
  109. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSString *)\b calendarFormat\b0     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".\
  110. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setCalendarFormat:\b0 (NSString *)\i format    \i0 Sets the calendar format for the receiving object to \i format\i0 . \
  111. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  112. \
  113. \
  114. \fs28 Getting and Setting Time Zones \
  115. \fs16 \
  116. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b setTimeZone:\b0 (NSTimeZone *)\i timeZone\i0     Sets the time-zone object associated with the NSCalendarDate object to \i timeZone\i0 .\
  117. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSTimeZoneDetail *)\b timeZoneDetail\b0     Returns the time-zone detail object associated with the NSCalendarDate object.\
  118. \fi-6552 \pard \s0 \li100 \fi0 \ri1007 \tx478 \tx856 \tx1234 \fs28 \fs16 \
  119. \
  120. \fs28 \
  121. \fs16 \
  122. \
  123. \fs28 \pard \s0 \
  124. \li100 \fi0 \fs16 \
  125. \
  126. \fs28 \
  127. \fs16 \
  128. \
  129. \fs28 }
  130.