Posted By

paki on 06/02/11


day nsstring NSDate

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Get days name from NSDate

 / Published in: Objective C

  1. NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  2. [dateFormatter setDateFormat:@"EEEE"];
  3. NSString *dayName = [dateFormatter stringFromDate:inDate];
  4. //Optional - get first 3 letters of days name
  5. dayName = [dayName substringToIndex:3];
  6. [dateFormatter release];

Report this snippet  

You need to login to post a comment.