To take care about timezones and everything you could do something like this:
- (NSInteger)day {
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSDayCalendarUnit | NSMonthCalendarUnit fromDate:self];
return [components day];
}
- (NSInteger)month {
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSDayCalendarUnit | NSMonthCalendarUnit fromDate:self];
return [components month];
}
- (NSInteger)year {
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSYearCalendarUnit fromDate:self];
return [components year];
}
Of course you can put it all together in one function just remember to alter components accordingly.
Caveat:
If you want something to show to the user, use one of the other answers with NSDateFormatter.