tests/testthat/testDATEDIF.R

ReturnD <- DATEDIF(DATE(2020,1,1),DATE(2020,1,31),"d")
ReturnM <- DATEDIF(DATE(2020,1,1),DATE(2020,6,23),"m")
ReturnY <- DATEDIF(DATE(2020,1,1),DATE(2040,1,1),"Y")

expect_equal(ReturnD,30)
expect_equal(ReturnM,5)
expect_equal(ReturnY,20)

Try the ExcelFunctionsR package in your browser

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

ExcelFunctionsR documentation built on July 1, 2020, 8:35 p.m.