Created
October 18, 2010 15:09
-
-
Save jakemarsh/632355 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface NSDate (PrettySectionHeaderAdditions) | |
- (NSString *) prettySectionHeaderDateSring; | |
@end | |
@implementation NSDate (PrettySectionHeaderAdditions) | |
- (NSString *) prettySectionHeaderDateSring { | |
NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease]; | |
[formatter setDateFormat:@"EEEE, LLLL d"]; //Resolves to: "Wednesday, September 13" | |
[formatter setAMSymbol:@"am"]; | |
[formatter setPMSymbol:@"pm"]; | |
return [formatter stringFromDate:self]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment