Skip to content

Commit

Permalink
support on 1.9- as well
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin committed Oct 2, 2023
1 parent f0f2a43 commit 50cfd22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ uuid = "3587e190-3f89-42d0-90ee-14403ec27112"
version = "0.1.13"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[weakdeps]
Expand Down
4 changes: 4 additions & 0 deletions src/InverseFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ include("inverse.jl")
include("setinverse.jl")
include("test.jl")

@static if !isdefined(Base, :get_extension)
include("../ext/DatesExt.jl")
end

end # module
2 changes: 1 addition & 1 deletion test/test_inverse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ end
end
end

VERSION v"1.9" && @testset "dates" begin
@testset "dates" begin
InverseFunctions.test_inverse(Dates.date2epochdays, Date(2020, 1, 2); compare = ===)
InverseFunctions.test_inverse(Dates.datetime2epochms, DateTime(2020, 1, 2, 12, 34, 56); compare = ===)
InverseFunctions.test_inverse(Dates.epochdays2date, Int64(1234); compare = ===)
Expand Down

0 comments on commit 50cfd22

Please sign in to comment.