tests/testthat/test-tibetan.R

test_that("tibetan", {
  expect_equal(
    tibetan_date(2152, 4, FALSE, 1:30, FALSE) |>
      cal_tibetan$from_rd() |>
      cal_tibetan$to_rd(),
    tibetan_date(2152, 4, FALSE, 1:30, FALSE) |> vctrs::vec_data()
  )
  # New year
  expect_equal(
    tibetan_new_year(2025:2026),
    gregorian_date(2025:2026, 2, c(28, 18))
  )
})

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.