What if you want to know the day of the month (e.g., June 1st) for an NSDate object? An NSDate does not know this information. Instead, you must ask an instance of NSCalendar.
NSCalendar is another Foundation class. You can create an instance of NSCalendar by sending the NSCalendar class the currentCalendar message.
The class method currentCalendar will return the address of an NSCalendar instance that matches the user’s settings. (In most western countries, the Gregorian calendar is the default, but there are several other calendars, like the Hebrew calendar and the Islamic calendar.) Ask the NSCalendar class for an instance of NSCalendar.
#import <Foundation/Foundation.h> int ...