Up
Authors
- Generated by Gregory John Casamento,,,
-
Date: Generated at 2023-12-20 19:35:39 -0500
- Declared in:
- Foundation/NSCalendar.h
- Conforms to:
- NSCoding
- NSCopying
Availability: MacOS-X 10.4.0
Description forthcoming.
Method summary
+ (id)
autoupdatingCurrentCalendar;
Availability: MacOS-X 10.5.0
A calendar that tracks changes to the user's calendar.
+ (id)
calendarWithIdentifier: (
NSString*)string;
Availability: MacOS-X 10.4.0
Create a calendar with the given string
as identifier.
+ (id)
currentCalendar;
Availability: MacOS-X 10.4.0
Returns the current calendar.
- (
NSString*)
calendarIdentifier;
Availability: MacOS-X 10.4.0
Returns the calendar identifier for the receiver.
- (
NSInteger)
component: (
NSCalendarUnit)unit
fromDate: (
NSDate*)date;
Availability: MacOS-X 10.9.0
Returns the integer value of the specified
unit from the given date.
- (
NSDateComponents*)
components: (
NSUInteger)unitFlags
fromDate: (
NSDate*)date;
Availability: MacOS-X 10.4.0
Returns the calendar units specified by
unitFlags for the given date
object.
- (
NSDateComponents*)
components: (
NSUInteger)unitFlags
fromDate: (
NSDate*)startingDate
toDate: (
NSDate*)resultDate
options: (
NSUInteger)opts;
Availability: MacOS-X 10.4.0
Compute the different between the specified
components in the two dates. Values are summed
up as long as now higher-granularity
unit is specified. That means if you want to extract
the year and the day from two dates which are 13 months
+ 1 day apart, you will get 1 as the result for the year
but the rest of the difference in days. (29 <= x
<= 32, depending on the month). Please note that
the NSWrapCalendarComponents option that should affect
the calculations is not presently supported.
- (
NSDate*)
dateByAddingComponents: (
NSDateComponents*)comps
toDate: (
NSDate*)date
options: (
NSUInteger)opts;
Availability: MacOS-X 10.4.0
Returns a date object created by adding
the NSDateComponents in comps to to object
date with the options specified by
opts.
- (
NSDate*)
dateFromComponents: (
NSDateComponents*)comps;
Availability: MacOS-X 10.4.0
Creates an NSDate from NSDateComponents in
comps.
- (
NSUInteger)
firstWeekday;
Availability: MacOS-X 10.4.0
Returns the integer value of the first weekday
(0-6).
- (void)
getEra: (
NSInteger*)eraValuePointer
year: (
NSInteger*)yearValuePointer
month: (
NSInteger*)monthValuePointer
day: (
NSInteger*)dayValuePointer
fromDate: (
NSDate*)date;
Availability: MacOS-X 10.9.0
Returns by reference the era, year, month, and day
from the given date.
- (void)
getEra: (
NSInteger*)eraValuePointer
yearForWeekOfYear: (
NSInteger*)yearValuePointer
weekOfYear: (
NSInteger*)weekValuePointer
weekday: (
NSInteger*)weekdayValuePointer
fromDate: (
NSDate*)date;
Availability: MacOS-X 10.9.0
Returns by reference the era, year, week of year,
and weekday from the given date.
- (void)
getHour: (
NSInteger*)hourValuePointer
minute: (
NSInteger*)minuteValuePointer
second: (
NSInteger*)secondValuePointer
nanosecond: (
NSInteger*)nanosecondValuePointer
fromDate: (
NSDate*)date;
Availability: MacOS-X 10.9.0
Returns by reference the hour, minute, second, and
nanosecond from the given date.
- (id)
initWithCalendarIdentifier: (
NSString*)string;
Availability: MacOS-X 10.4.0
Instantiate a calendar with the given
string as identifier.
- (
NSLocale*)
locale;
Availability: MacOS-X 10.4.0
Returns the locale of the receiver.
- (
NSRange)
maximumRangeOfUnit: (
NSCalendarUnit)unit;
Availability: MacOS-X 10.4.0
Returns the maximum range of unit.
- (
NSUInteger)
minimumDaysInFirstWeek;
Availability: MacOS-X 10.4.0
Returns the minimum number of days in the first
week of the receiver.
- (
NSRange)
minimumRangeofUnit: (
NSCalendarUnit)unit;
Availability: MacOS-X 10.4.0
Returns the minimum range of unit.
- (
NSUInteger)
ordinalityOfUnit: (
NSCalendarUnit)smaller
inUnit: (
NSCalendarUnit)larger
forDate: (
NSDate*)date;
Availability: MacOS-X 10.4.0
Returns the ordinality of unit smaller
within the unit larger with the given
date.
- (BOOL)
rangeOfUnit: (
NSCalendarUnit)unit
startDate: (
NSDate**)datep
interval: (
NSTimeInterval*)tip
forDate: (
NSDate*)date;
Availability: MacOS-X 10.5.0
Returns by referene the started time and duration
of a given unit containing the given
date.
- (void)
setFirstWeekday: (
NSUInteger)weekday;
Availability: MacOS-X 10.4.0
Set the integer first weekday of the week
(0-6).
- (void)
setLocale: (
NSLocale*)locale;
Availability: MacOS-X 10.4.0
Sets the locale of the receiver.
- (void)
setMinimumDaysInFirstWeek: (
NSUInteger)mdw;
Availability: MacOS-X 10.4.0
Sets the minimum number of days in the first week of
the receiver.
- (void)
setTimeZone: (
NSTimeZone*)tz;
Availability: MacOS-X 10.4.0
Sets tz as the current NSTimeZone of the
receiver.
- (
NSTimeZone*)
timeZone;
Availability: MacOS-X 10.4.0
Returns the NSTimeZone associated with the
receiver.
- Declared in:
- Foundation/NSCalendar.h
- Conforms to:
- NSCopying
Availability: MacOS-X 10.4.0
Description forthcoming.
Method summary
- (
NSCalendar*)
calendar;
Availability: MacOS-X 10.7.0
Description forthcoming.
- (
NSDate*)
date;
Availability: MacOS-X 10.7.0
Computes a date by using the components set in
this NSDateComponents instance.
A calendar (and optionally a time zone) must be set
prior to calling this method.
- (
NSInteger)
day;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
era;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
hour;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (BOOL)
isValidDate;
Availability: MacOS-X 10.9.0
Description forthcoming.
- (BOOL)
isValidDateInCalendar: (
NSCalendar*)calendar;
Availability: MacOS-X 10.9.0
Description forthcoming.
- (BOOL)
leapMonth;
Availability: MacOS-X 10.8.0
Description forthcoming.
- (
NSInteger)
minute;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
month;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
nanosecond;
Availability: MacOS-X 10.7.0
Description forthcoming.
- (
NSInteger)
quarter;
Availability: MacOS-X 10.6.0
Description forthcoming.
- (
NSInteger)
second;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setCalendar: (
NSCalendar*)cal;
Availability: MacOS-X 10.7.0
Description forthcoming.
- (void)
setDay: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setEra: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setHour: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setLeapMonth: (BOOL)v;
Availability: MacOS-X 10.8.0
Description forthcoming.
- (void)
setMinute: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setMonth: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setNanosecond: (
NSInteger)v;
Availability: MacOS-X 10.7.0
Description forthcoming.
- (void)
setQuarter: (
NSInteger)v;
Availability: MacOS-X 10.6.0
Description forthcoming.
- (void)
setSecond: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setTimeZone: (
NSTimeZone*)tz;
Availability: MacOS-X 10.7.0
Description forthcoming.
- (void)
setValue: (
NSInteger)value
forComponent: (
NSCalendarUnit)unit;
Availability: MacOS-X 10.9.0
Description forthcoming.
- (void)
setWeek: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setWeekOfMonth: (
NSInteger)v;
Availability: MacOS-X 10.7.0
Sets the number of the week in this month.
- (void)
setWeekOfYear: (
NSInteger)v;
Availability: MacOS-X 10.7.0
Sets the number of the week in this year. Identical to
calling
-setWeek:
.
- (void)
setWeekday: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setWeekdayOrdinal: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setYear: (
NSInteger)v;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (void)
setYearForWeekOfYear: (
NSInteger)v;
Availability: MacOS-X 10.7.0
- (
NSTimeZone*)
timeZone;
Availability: MacOS-X 10.7.0
Description forthcoming.
- (
NSInteger)
week;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
weekOfMonth;
Availability: MacOS-X 10.7.0
Returns the number of the week in this month.
- (
NSInteger)
weekOfYear;
Availability: MacOS-X 10.7.0
Returns the number of the week in this year.
Identical to calling week
.
- (
NSInteger)
weekday;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
weekdayOrdinal;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
year;
Availability: MacOS-X 10.4.0
Description forthcoming.
- (
NSInteger)
yearForWeekOfYear;
Availability: MacOS-X 10.7.0
The year corresponding to the current week. This value
may differ from year around the end of the year. For
example, for 2012-12-31, the year number is 2012,
but yearForWeekOfYear is 2013, since it's already week
1 in 2013.
Up