kevinlawler/NSDate-TimeAgo

let dateFormatter: NSDateFormatter = NSDateFormatter()

khakha010 opened this issue · 0 comments

let dateFormatter: NSDateFormatter = NSDateFormatter()
dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX")
dateFormatter.timeZone = NSTimeZone(abbreviation: "UTC")
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSX"
if let date = dateFormatter.dateFromString(dateString) {
// I get valid a NSDate object
}

Originally posted by @khakha010 in #90 (comment)