book--hacking-with-swift/38-core-data-github-commits/Date Formatting.playground/Contents.swift

10 lines
126 B
Swift

import UIKit
let formatter = ISO8601DateFormatter()
let date = formatter.date(from: "2019-03-09T05:33:59Z")!
print(date)