is_valid_date_str: Returns TRUE if the string is a valid date.
Description
Taken from github.com/rmsharp/rmsutilityr
Usage
is_valid_date_str(
date_str,
format = "%d-%m-%Y %H:%M:%S",
optional = FALSE
)
Arguments
date_str
character vector with 0 or more dates
format
character vector of length one having the date format
optional
parameter to as.Date. Logical value indicating
to return NA (instead of signaling an error) if the format guessing does not
succeed. Defaults to FALSE.
Value
A logical value or NA indicating whether or not the provided
character vector represented a valid date string.