Created
October 23, 2020 17:03
-
-
Save atomicbird/302d2e815905df409093732992ec91f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
let dateStr = "625083573.303378" | |
func date(for dateString: String) -> Date? { | |
guard let timestamp = Double(dateString) else { return nil } | |
return Date(timeIntervalSinceReferenceDate: timestamp) | |
} | |
date(for: dateStr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment