Answers for "swift subtract dates"

0

swift subtract dates

extension Date {

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

}
Posted by: Guest on August-14-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language