import Foundation

extension Date {

    var timestamp: UInt32 {
        UInt32(timeIntervalSince1970.rounded())
    }

    init(timestamp: UInt32) {
        self.init(timeIntervalSince1970: TimeInterval(timestamp))
    }
}
