Skip to content

Commit ff6dbb3

Browse files
committed
fix stack overflow
1 parent 32ed459 commit ff6dbb3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stdlib/Dates/src/arithmetic.jl

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# TimeType arithmetic
88
(+)(x::TimeType) = x
99
(-)(x::T, y::T) where {T<:TimeType} = x.instant - y.instant
10+
(-)(x::T, y::T) where {T<:AbstractDateTime} = x.instant - y.instant
1011
(-)(x::AbstractDateTime, y::AbstractDateTime) = -(promote(x, y)...)
1112

1213
# Date-Time arithmetic

0 commit comments

Comments
 (0)