Consider the following:
julia> range = Dates.DateTime(2019):Dates.Year(1):Dates.DateTime(2020)
Dates.DateTime("2019-01-01T00:00:00"):Dates.Year(1):Dates.DateTime("2020-01-01T00:00:00")
julia> diff(range)
1-element Vector{Dates.DateTime}:
0001-12-31T00:00:00
julia> diff(collect(range))
1-element Vector{Dates.Millisecond}:
31536000000 milliseconds
The output for diff(::AbstractRange)
seems wrong in this case.