In my app, want to get the day (i.e. Sunday
, Monday
,etc.) from the date.
My code is as follow:
NSDate *currentDate = [NSDat
i am using this and it worked for me in iOS 8.4
-(NSString *) extractDayFromDate {
NSCalendar* calender = [NSCalendar currentCalendar];
NSDateComponents* component = [calender components:NSCalendarUnitWeekday fromDate:[NSDate date]];
return [[calender weekdaySymbols] objectAtIndex:([component weekday]-1)];
}