I want to know the day number of week from NSDate.
Example:- Suppose today is 10th Oct 2016, Here Week number is 3rd which i got using
NSInteger week = [_calendar component:NSCalendarUnitWeekOfMonth fromDate:date];
It will fetch you the day number i.e. 2. The day number are always same for every week. (1-7)
//Assuming your calendar is initiated like this NSCalendar *_calendar = [NSCalendar currentCalendar]; //Fetch the day number NSInteger day = [_calendar component:NSCalendarUnitWeekday fromDate:date];
NSCalendar for more details here