tests/testthat/test_roman.R

test_that("check Roman numeral dates work", {
  messy.dates <- c("01 ii 2021", "2023-iv-02", "13/ix/1975")
  expect_equal(
    fix_date_char(messy.dates, roman.numeral = TRUE),
    as.Date(c("2021-02-01", "2023-04-02", "1975-09-13"))
  )
})

Try the datefixR package in your browser

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

datefixR documentation built on Sept. 3, 2023, 5:08 p.m.