Skip to content

Commit

Permalink
Add additional kday tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed May 30, 2024
1 parent cb8916c commit 811eb62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/kday_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ defmodule Calendar.Kday.Test do
test "nth kday for k-day == day of date" do
assert Cldr.Calendar.Kday.nth_kday(~D[2022-01-01], 1, 5) == ~D[2022-01-07]
assert Cldr.Calendar.Kday.nth_kday(~D[2022-01-01], -1, 5) == ~D[2021-12-31]
assert Cldr.Calendar.Kday.nth_kday(~D[2024-01-01], 3, 1) == ~D[2024-01-15]
assert Cldr.Calendar.Kday.nth_kday(~D[2024-02-01], 3, 1) == ~D[2024-02-19]
end

test "last kday" do
assert Cldr.Calendar.Kday.last_kday(~D[2024-05-30], 1) == ~D[2024-05-27]
end
end

0 comments on commit 811eb62

Please sign in to comment.