tests/testthat/test-base.R

test_that("Date", {
  expect_identical(as.double(as.Date("1970-01-01") + 0.99), 0.99)
})

test_that("c", {
  expect_identical(as.double(as.Date("1970-01-01") + 0.99), 0.99)
  expect_equal(
    dtt_tz(c(as.POSIXct("2001-01-01 23:32:31", tz = "UTC"), NA_POSIXct_)), "UTC"
  )
})

Try the dttr2 package in your browser

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

dttr2 documentation built on Nov. 14, 2023, 5:10 p.m.