tests/testthat/test-string_to_years.R

test_that("extract years works", {
  x <- as.POSIXct("1990-3-15", format = "%Y-%m-%d")
  identical(format(x, "%Y"), "1990")
})

Try the GHCNr package in your browser

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

GHCNr documentation built on April 3, 2025, 11:16 p.m.