Skip to content

Commit

Permalink
fixup to #51743, timetype subtraction
Browse files Browse the repository at this point in the history
Restores the method whose removal was probably causing problems.
  • Loading branch information
JeffBezanson committed Oct 26, 2023
1 parent b5a531a commit 14d9c7c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions stdlib/Dates/src/arithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

# TimeType arithmetic
(+)(x::TimeType) = x
(-)(x::Date, y::Date) = x.instant - y.instant
(-)(x::Time, y::Time) = x.instant - y.instant
(-)(x::T, y::T) where {T<:TimeType} = x.instant - y.instant
(-)(x::DateTime, y::DateTime) = x.instant - y.instant
(-)(x::AbstractDateTime, y::AbstractDateTime) = -(promote(x, y)...)

Expand Down

0 comments on commit 14d9c7c

Please sign in to comment.