Skip to content

Commit 1977e1f

Browse files
committed
fixup to #51743, timetype subtraction
Restores the method whose removal was probably causing problems. (cherry picked from commit 14d9c7c)
1 parent f3e683d commit 1977e1f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

stdlib/Dates/src/arithmetic.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
# TimeType arithmetic
88
(+)(x::TimeType) = x
9-
(-)(x::Date, y::Date) = x.instant - y.instant
10-
(-)(x::Time, y::Time) = x.instant - y.instant
9+
(-)(x::T, y::T) where {T<:TimeType} = x.instant - y.instant
1110
(-)(x::DateTime, y::DateTime) = x.instant - y.instant
1211
(-)(x::AbstractDateTime, y::AbstractDateTime) = -(promote(x, y)...)
1312

0 commit comments

Comments
 (0)