quinnj / Datetime.jl

A Date and DateTime implementation for Julia; Now deprecated in favor of https://github.com/quinnj/Dates.jl
Other
20 stars 15 forks source link

dayofweek() return value inconsistent with day definition for Sunday #32

Closed msravi closed 10 years ago

msravi commented 10 years ago

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

quinnj commented 10 years ago

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

quinnj commented 10 years ago

Fixed by ed8123ede2e316a181a781ecd54fd735657b6cd8