Skip to content

Instantly share code, notes, and snippets.

@akuraru
Created July 27, 2018 10:31
Show Gist options
  • Save akuraru/05ab10de52ad381114606f02a98ec4ad to your computer and use it in GitHub Desktop.
Save akuraru/05ab10de52ad381114606f02a98ec4ad to your computer and use it in GitHub Desktop.
import Foundation
Date.timeIntervalSinceReferenceDate
Date.timeIntervalBetween1970AndReferenceDate
Date().timeIntervalSince1970
Date().timeIntervalSinceReferenceDate
Date().addingTimeInterval(-Date().timeIntervalSinceReferenceDate)
978307200 / 60 / 60 / 24 / 365
print(String(554378506, radix: 2))
print(String(1532686820, radix: 2))
1532686820
let date = Date()
print(date.timeIntervalSinceReferenceDate)
print(Date().addingTimeInterval(0.000_000_001).timeIntervalSinceReferenceDate)
print(pow(2.0, -23.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment