Adding negative months does not rollover year
Hi,
Looks like adding -ve months doesn't rollover the year:
julia> using Datetime
julia> today() 2014-01-08
julia> today()+months(1) 2014-02-08
julia> today()+months(-1) 2014-12-08 *** Should return 2013-12-08 ***
*** The following work alright *** julia> today()+days(-1) 2014-01-07
julia> dt = date("2014-01-01") 2014-01-01
julia> dt+days(-1) 2013-12-31
julia> today()+years(-1) 2013-01-08
Hope this helps.
Regards, Ravi
Similarly,
julia> date("2013-12-27")-months(-1) 2013-01-27
Regards, Ravi
Thanks. Yeah, I found this as well as I was doing the rewrite to merge into Base. See JuliaLang/julia#5328. The examples above work on that code and I'll add some more tests for these.
Fixed by ed8123ede2e316a181a781ecd54fd735657b6cd8