tests/testthat/test-utc_julian_2000.R

context("test-utc_julian_2000")

test_that("utc_julian_2000 works", {
  expect_equal(
    utc_julian_2000(as.POSIXct("2000-01-01 12:00:00", tz = "UTC")),
    0
  )
  expect_equal(
    utc_julian_2000(as.POSIXct("2019-01-01 12:00:00", tz = "UTC")),
    599616000 / 86400 / 36525
  )
})

Try the earthtide package in your browser

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

earthtide documentation built on Nov. 16, 2023, 5:07 p.m.