Rounding dates API

round(T, x) works like this

julia> round(Int16, float(pi))
3

but for Dates it’s backwards:

julia> round(today(), Week)
2022-11-28

Why is this?

What do you mean by backwards? (as 3 is also smaller than pi)

I think @jar1 is referring to the argument order: round(Week, today()) seems more consistent with round(T, x)?

4 Likes

Thanks, outputting the results is a distraction from the question.