Julia: Dates `+` works on array of Dates and a single Date

Created on 30 Sep 2020  Â·  4Comments  Â·  Source: JuliaLang/julia

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

dates deprecation

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.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wilburtownsend picture wilburtownsend  Â·  3Comments

ararslan picture ararslan  Â·  3Comments

dpsanders picture dpsanders  Â·  3Comments

omus picture omus  Â·  3Comments

yurivish picture yurivish  Â·  3Comments