assertthat
assertthat copied to clipboard
error with assertthat::is.date()
hi!
For some reason the assertthat function is.date() will return TRUE for non date functions in certain situations.
Is this the intended functionality of the function?
# not a real date , this will return NA
fake_date <- lubridate::ymd("2021-13-01")
# however this will return TRUE when passing through is.date()
assertthat::is.date(fake_date)
Is there a way to use assert that function to validate an object is date time format?