tests/testthat/test-utils.R

test_that("datetimes and seconds work", {
  start <- ISOdate(1970, 1, 1, 0)
  expect_identical(datetime2seconds(seconds2datetime(datetime2seconds(start))), 0)
  expect_identical(datetime2seconds(seconds2datetime(datetime2seconds(dttr2::dtt_add_seconds(start, 3L)))), 3)
})

Try the rtide package in your browser

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

rtide documentation built on May 30, 2021, 1:07 a.m.