tests/testthat/test-format_helpers.R

tmp <- as_date("2023-12-24")

test_that("format_u works", {
  expect_equal(format_u(tmp), "7")
})

test_that("format_md works", {
  expect_equal(format_md(tmp), "12-24")
})

test_that("format_Y works", {
  expect_equal(format_Y(tmp), "2023")
})

test_that("format_Y works", {
  expect_equal(format_j(tmp), "358")
})

Try the standardlastprofile package in your browser

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

standardlastprofile documentation built on May 29, 2024, 2:54 a.m.