julia> using Dates
julia> x = Date(2020):Week(1):Date(2021)
2020-01-01:1 week:2020-12-30
julia> dx = step(x)
1 week
julia> zero(dx)
0 weeks
julia> one(dx)
1
CC @mcabbott
I presume the reasoning is this:
julia> one(dx) * Week(3)
3 weeks
julia> zero(dx) + Week(3)
3 weeks
It's on purpose the one doesn't have units. That's why there is oneunit
julia> oneunit(dx)
1 week
That makes sense.
Most helpful comment
It's on purpose the
onedoesn't have units. That's why there isoneunit