Get days name from NSDate


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.