Nothing
test_that("this_year() returns this year", {
year_now <- yr(lubridate::year(lubridate::now()), "CE")
expect_equal(this_year(), year_now)
})
test_that("this_year() rounds negative years correctly", {
year_now <- yr(lubridate::year(lubridate::now()), "CE")
year_now <- yr_transform(year_now, "BP", precision = 1)
expect_equal(this_year("BP"), year_now)
})
test_that("this_year() is vectorised", {
year_now <- yr(lubridate::year(lubridate::now()), "CE")
year_now_bp <- yr_transform(year_now, "BP", precision = 1)
year_now_b2k <- yr_transform(year_now, "b2k", precision = 1)
expect_equal(
this_year(c("CE", "BP", "b2k")),
list(year_now, year_now_bp, year_now_b2k)
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.