I'm getting dates as Unix timestamps through my API and I want to convert them into NSDate objects in Swift.
How can I do that?
Try this:
var date = NSDate(timeIntervalSince1970: timeInterval)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With