Test whether string represents ISO 8601-formatted date-time
Source:R/utilities.R
is_iso_date_time.Rd
The expected format is "dddd-dd-ddTdd:dd" with "d" a digit. This function tests whether the above is part of the input, i.e., date-time formats that also include seconds information are also recognized.
Examples
is_iso_date_time("2023-09-27T15:04")
#> [1] TRUE
is_iso_date_time("2023-09-27T15:04:00")
#> [1] TRUE
is_iso_date_time(c("2023-03-21T11:55", "2023-07-18"))
#> [1] TRUE FALSE