Many functions expect Dates. Determining that they are validly entered is often quite computationally costly, relative to the core calculations. These internal functions provide mechanisms to check validity quickly, while still providing clear, accurate error messages.
validate_date(date_to_verify, from = NULL, to = NULL, deparsed = "Date")
date_to_verify | (character) A user-provided value, purporting to be character vector of dates. |
---|---|
from, to | Indicating the range of years valid for |
deparsed | The name of variable to appear in error messages. |
date_to_verify
as a Date object, provided it can be converted
to a Date and all elements are within the bounds from
and to
.