Day Name From NSDate?

Amine Arous picture Amine Arous · Jan 20, 2011 · Viewed 26.1k times · Source

I would like to show the name of day in my iPhone application and i don't found the solution. Thanks for help

Answer

Jilouc picture Jilouc · Jan 20, 2011
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"EEEE"];
NSString *dayName = [dateFormatter stringFromDate:yourDate];
[dateFormatter release];

You get dayName in the locale of the user.

(check Unicode standards for date formats samples)