Take the 2-minute tour ×

I have an application where I want to display data as per week.

I also have the button so that user can toggle around the weeks.

Is there any way in iPhone sdk (May be using DateFormatter) to get the current week and also to toggle around the previous and next week.


share|improve this question

1 Answer 1

up vote 1 down vote accepted

The class you want is NSCalendar. Look at -rangeOfUnit:startDate:interval:forDate: and -ordinalityOfUnit:inUnit:forDate: for what you're talking about.

share|improve this answer

Your Answer


