Up

# NSCalendar documentation

### Authors

Generated by Debian

# Software documentation for the NSCalendar class

## NSCalendar : NSObject

> Declared in:
>   Foundation/NSCalendar.h

> Conforms to:
>   NSCoding
>   NSCopying

Availability: MacOS-X 10.4.0
Description forthcoming.
Method summary

- +autoupdatingCurrentCalendar
- +calendarWithIdentifier:
- +currentCalendar
- -calendarIdentifier
- -component:fromDate:
- -components:fromDate:
- -components:fromDate:toDate:options:

### autoupdatingCurrentCalendar

+ (id) autoupdatingCurrentCalendar;
Availability: MacOS-X 10.5.0
A calendar that tracks changes to the user's calendar.

### calendarWithIdentifier:

+ (id) calendarWithIdentifier: (NSString*)identifier;
Availability: MacOS-X 10.4.0
Create a calendar with the given string as identifier.

### currentCalendar

+ (id) currentCalendar;
Availability: MacOS-X 10.4.0
Returns the current calendar.

### calendarIdentifier

- (NSString*) calendarIdentifier;
Availability: MacOS-X 10.4.0
Returns the calendar identifier for the receiver.

### component: fromDate:

- (NSInteger) component: (NSCalendarUnit)unit fromDate: (NSDate*)date;
Availability: Not in OpenStep/MacOS-X
Returns the integer value of the specified unit from the given date.

### components: fromDate:

- (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.

### components: fromDate: toDate: options:

- (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

Up