Skip to content

Commit

Permalink
test case issue #27
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Jun 21, 2024
1 parent 86ca26e commit 29b0da0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test_time.jl
Original file line number Diff line number Diff line change
Expand Up @@ -538,3 +538,18 @@ end


@test_logs (:warn,r".*cannot.*") @test_throws InexactError convert(DateTime,DateTimeStandard(2000,1,1,0,0,0,0,1,units = :microsecond))



# issue #27

# the leap day: 29 Feburary -4717 in proleptic Julian calendar
# https://web.archive.org/web/20231211220247/https://tondering.dk/claus/cal/chrmisc.php
Z = -2401403
T = DateTimeJulian
RYMD = Reference.datetuple_ymd(T,Z)
MYMD = CFTime.datetuple_ymd(T,Z)
@test RYMD == MYMD

Z2 = CFTime.datenum(T,MYMD...)
@test Z == Z2

0 comments on commit 29b0da0

Please sign in to comment.