| is_valid_dtc | R Documentation |
Is this string a valid DTC?
is_valid_dtc(arg, check_dtc = FALSE)
arg |
The string to check.
|
check_dtc |
If
|
If check_dtc is FALSE, the function only checks if the format of the
string is valid, i.e. it will not check if the actual date/datetime is real, so
calls such as is_valid_dtc("2020-13", check_dtc = FALSE) and
is_valid_dtc("2020-12-01T25:00:00", check_dtc = FALSE) will returnTRUE.
TRUE if the argument is a valid --DTC string, FALSE otherwise
Identifies type of Object with return of TRUE/FALSE:
is_auto(),
is_order_vars()
## Format is valid, date/datetimes are real
is_valid_dtc("2020-02")
is_valid_dtc("2020-02-28")
is_valid_dtc("2020-02-28T14:43")
# Format is valid, date/datetimes are not real but this is not checked
is_valid_dtc("2020-02-31")
is_valid_dtc("2020-02-28T25:00:00")
# Format is valid, date/datetimes are not real and this is checked
is_valid_dtc("2020-02-31", check_dtc = TRUE)
is_valid_dtc("2020-02-28T25:00:00", check_dtc = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.