Created
December 6, 2013 15:47
-
-
Save mattyohe/7826904 to your computer and use it in GitHub Desktop.
NSDateFormatter fun!
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
NSTimeInterval time = 1388543400; | |
NSDateFormatter *formatter = [NSDateFormatter new]; | |
[formatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"EST"]]; | |
[formatter setDateFormat:@"MMMM d, YYYY"]; | |
NSLog(@"%@",[formatter stringFromDate:[NSDate dateWithTimeIntervalSince1970:time]]); | |
[formatter setDateFormat:@"MMMM d, yyyy"]; | |
NSLog(@"%@",[formatter stringFromDate:[NSDate dateWithTimeIntervalSince1970:time]]); | |
#### December 31, 2014 | |
#### December 31, 2013 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment