JuliaLang/julia

Dates round/floor/ceil arguments switched

Open

#47,786 opened on Dec 2, 2022

View on GitHub
 (7 comments) (4 reactions) (0 assignees)Julia (5,773 forks)batch import
datesgood first issuehelp wanted

Repository metrics

Stars
 (48,709 stars)
PR merge metrics
 (Avg merge 20d 6h) (157 merged PRs in 30d)

Description

round(T, x) is the normal API, but in Dates.jl the arguments are reversed.

julia> ceil(today(), Week)
2022-12-05

julia> ceil(Week, today())
ERROR: MethodError: no method matching ceil(::Type{Week}, ::Date)

Contributor guide