开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜