tests/testthat/test-us_holidays.R

test_that("us_holidays", {
  expect_equal(us_independence_day(2025), gregorian_date(2025, 7, 4))
  expect_equal(us_labor_day(2025), gregorian_date(2025, 9, 1))
  expect_equal(us_memorial_day(2025), gregorian_date(2025, 5, 26))
  expect_equal(us_election_day(2025), gregorian_date(2025, 11, 4))
  expect_equal(us_daylight_saving_start(2025), gregorian_date(2025, 3, 9))
  expect_equal(us_daylight_saving_end(2025), gregorian_date(2025, 11, 2))
})

Try the calcal package in your browser

Any scripts or data that you put into this service are public.

calcal documentation built on Feb. 25, 2026, 9:07 a.m.