I see there are
static func + (lhs: Date, rhs: TimeInterval) -> Date
static func - (lhs: Date, rhs: TimeInterval) -> Date
But no
static func - (lhs: Date, rhs: Date) -> TimeInterval
Is this asymmetry intentional? Or shall I quickly contribute an MR?
2 Likes
Tino
(Tino)
2
I'd stay away from that minefield as far as I could
(see https://forums.swift.org/t/pitch-clock-instant-date-and-duration/ — no matter what you do, unexpected things will happen when performing date calculations)
1 Like