tests/testthat/test-pillar.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("pillar_shaft methods work", {
  skip_if_not_installed("pillar")
  expect_s3_class(pillar::pillar_shaft(datey(2000)), "pillar_shaft")
  expect_s3_class(pillar::pillar_shaft(durationy(1)), "pillar_shaft")
  expect_s3_class(pillar::pillar_shaft(1000 %to% 1001), "pillar_shaft")
})

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.