tests/testthat/test-text.R

# Date and duration arithmetic on an annual grid for R
#
# This file is licensed to you under the MIT License.
#
# Copyright (c) Tim Gordon

test_that("datey as.character(x) == format(x)", {
  x <- datey(1950)
  expect_identical(as.character(x), format(x))
})

test_that("durationy as.character(x) == format(x)", {
  x <- durationy(12.34)
  expect_identical(as.character(x), format(x))
})

Try the datey package in your browser

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

datey documentation built on July 14, 2026, 5:06 p.m.