fmt_rg()
creates a character vector of named patterns to match individual
date/time components.
fmt_rg(
sec = "(\\b\\d|\\d{2})(\\.\\d*)?",
min = "(\\b\\d|\\d{2})",
hour = "\\d?\\d",
mday = "\\b\\d|\\d{2}",
mon = stringr::str_glue("\\d\\d|{months_abb_regex()}"),
year = "(\\d{2})?\\d{2}",
na = NULL,
sec_na = na,
min_na = na,
hour_na = na,
mday_na = na,
mon_na = na,
year_na = na
)
A named character vector of named patterns (regexps) for matching each date/time component.
Regexp for the second component.
Regexp for the minute component.
Regexp for the hour component.
Regexp for the month day component.
Regexp for the month component.
Regexp for the year component.
Regexp of alternatives, useful to match special values coding for missingness.
Same as na
but specifically for the second component.
Same as na
but specifically for the minute component.
Same as na
but specifically for the hour component.
Same as na
but specifically for the month day component.
Same as na
but specifically for the month component.
Same as na
but specifically for the year component.