tags:

views:

68

answers:

1

Hello guys,

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.

Tnx.

+1  A: 

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

Rob Napier