Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Day Name From NSDate?

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

like image 690
Amine Arous Avatar asked Jan 20 '11 08:01

Amine Arous


1 Answers

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)

like image 140
Jilouc Avatar answered Oct 05 '22 16:10

Jilouc