Sesame-iOS/Sesame/Extensions/Date+Timestamp.swift
2023-12-12 17:33:42 +01:00

13 lines
224 B
Swift

import Foundation
extension Date {
var timestamp: UInt32 {
UInt32(timeIntervalSince1970.rounded())
}
init(timestamp: UInt32) {
self.init(timeIntervalSince1970: TimeInterval(timestamp))
}
}