Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with assertthat::is.date() #82

Open
alejandrohagan opened this issue Nov 24, 2023 · 0 comments
Open

error with assertthat::is.date() #82

alejandrohagan opened this issue Nov 24, 2023 · 0 comments

Comments

@alejandrohagan
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant