quinnj / Datetime.jl

A Date and DateTime implementation for Julia; Now deprecated in favor of https://github.com/quinnj/Dates.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dayofweek() return value inconsistent with day definition for Sunday

msravi opened this issue · comments

Seems like the return value of dayofweek() is inconsistent with the day definition for Sunday. dayofweek() returns 0 for Sunday, while Sunday is defined as 7.

julia> using Datetime

julia> dt=date("2014-01-05")
2014-01-05

julia> dayofweek(dt)
0

julia> Sunday
7

Regards,
Ravi

This is fixed in JuliaLang/julia#5328 as well.

Fixed by ed8123e