Out of nowhere: calendarIdentifier Selector


Again struggling to work out the jumps the books makes without seeming to clarify.

Simply put no explanation is given for the selector calendarIdentifier as used in chapter 14 previously.

NSCalendar *cal = [NSCalendar currentCalendar]; 
NSLog(@" My calendar is %@", [cal calendarIdentifier]); } 
return 0;

Can someone please flesh out this selector’s meaning and it’s use



It is all described in the class documentation for NSCalendar.

@property(readonly, copy) NSCalendarIdentifier calendarIdentifier;
// Declaration

typedef NSString *NSCalendarIdentifier;

// Discussion
Use these identifiers to specify the kind of calendar.
The Gregorian calendar is the calendar typically used in Europe, the Western Hemisphere, and elsewhere.



Thanks ibex10.

Though, once again, TBH it’s appearance should have made clearer in the book IMO—no guidance was given to it’s appearance and usage.