views:

33

answers:

1

hi. i need to get the actual year, only the year but when i search for the result, i get always 0001. why is it?

with the component i can get the day and the month.

A: 

no ok ok... i've solved putting a variable:

unsigned int unitFlags = NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit;

and assigning it to the components in the NSDatecomponents object.

Néstor