Skip to content

Commit

Permalink
more tests for date ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Dec 13, 2018
1 parent 0c5ade0 commit 01c48f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test_time.jl
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,13 @@ end

@test length(DateTimeNoLeap(2000, 01, 01):Day(1):DateTimeNoLeap(2000, 12, 31)) == 365
@test length(DateTimeNoLeap(2000, 01, 01):Month(1):DateTimeNoLeap(2000, 12, 31)) == 12
@test length(DateTimeNoLeap(2000, 01, 01):Year(1):DateTimeNoLeap(2001, 1, 1)) == 2

for T in [DateTimeStandard, DateTimeJulian, DateTimeProlepticGregorian,
DateTimeAllLeap, DateTimeNoLeap, DateTime360Day]

# end date is inclusive
@test length(T(2000, 01, 01):Month(1):T(2001, 1, 1)) == 13
@test length(T(2000, 01, 01):Year(1):T(2001, 1, 1)) == 2
end

# if @isdefined DataArrays
Expand Down

0 comments on commit 01c48f5

Please sign in to comment.