Why does Dates allow non-broadcasted arithmatic?



In the code for Dates there is the following:

# TimeType, AbstractArray{TimeType}
(-)(x::AbstractArray{T}, y::T) where {T<:TimeType} = x .- y
(-)(y::T, x::AbstractArray{T}) where {T<:TimeType} = y .- x

Is this intended? Was it some code to get around deprecation warnings for a period of time?


I imagine this is just an oversight. It should be possible to deprecate it given that Dates is in stdlib. At least it’s worth filing an issue.