Convert from UNIX Epoch to Date String
How do I conv开发者_StackOverflowert from a unix epoch integer to date string?
Code:
NSUInteger *foo = 123456789;
NSString *bar = [[NSDate dateWithTimeIntervalSince1970:foo] description];
PLEASE PLEASE PLEASE PLEASE PLEASE be user-friendly and show the date according to the locale of the user: Cocoa - Localized string from NSDate, NSCalendarDate
精彩评论