tests/testthat/test_time.R

library(BigginsTime)

context("Time")

test_that("midday", {
  expect_equal(as.Time(1200), as.POSIXct(paste(date = Sys.Date(), format(strptime(1200, format = "%H%M"), format = "%H:%M") ), format = "%Y-%m-%d %H:%M"))
})
sarotter/BigginsTime documentation built on May 29, 2019, 2 p.m.