collect(1:23) .+ 1
✅
collect(1:23) + 1
🙅
Dates.Hour.(0:23) .+ DateTime("20200902", "yyyymmdd")
✅
Dates.Hour.(0:23) + DateTime("20200902", "yyyymmdd")
✅
Is there a reason why these deprecations are commented out? cc @nickrobinson251
Is there a reason why these deprecations are commented out?
Probably because deprecations were on by default when they were added. We should probably consider turning these on now that deprecations are off by default.
Ref https://github.com/JuliaLang/julia/issues/28672, https://github.com/JuliaLang/julia/pull/29509. I think it was an accident they wasn't deprecated in 1.0.
Ok, action item is to just uncomment the depwarns.
Related: https://github.com/JuliaLang/julia/pull/37759#issuecomment-702787433. There is no deprecation currently for +(r::AbstractRange{<:TimeType}, x::Period)
Most helpful comment
Ref https://github.com/JuliaLang/julia/issues/28672, https://github.com/JuliaLang/julia/pull/29509. I think it was an accident they wasn't deprecated in 1.0.