📜  快速减去日期 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:00:58.989000             🧑  作者: Mango

代码示例1
extension Date {

    static func - (lhs: Date, rhs: Date) -> TimeInterval {
        return lhs.timeIntervalSinceReferenceDate - rhs.timeIntervalSinceReferenceDate
    }

}