Converting from UNIX to Date String

How to convert from string unix epoch integer to date?

+3
source share
1 answer

the code:

NSUInteger *foo = 123456789;
NSString *bar = [[NSDate dateWithTimeIntervalSince1970:foo] description];

PLEASE PLEASE PLEASE PLEASE PLEASE be friendly and display the date according to the user's language: Cocoa - Localized string from NSDate, NSCalendarDate

+9
source

Source: https://habr.com/ru/post/1778631/


All Articles