tests/testthat/test_toOrdinalDate_english.R

context("English date tests")

test_that("toOrdinalDate correctly converts dates", {
  test_date <- "October 9th, 2017"
  using_toOrdinalDate <- toOrdinalDate("2017-10-09")

  expect_equal(
    test_date, using_toOrdinalDate
  )
})

Try the toOrdinal package in your browser

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

toOrdinal documentation built on March 18, 2022, 6:34 p.m.