Construct a regular expression for DATE values
reg_date(flatten = TRUE, only = TRUE)
A logical value which determines whether a single regex string should be returned (flatten = TRUE) or if a vector of them should be returned (flatten = FALSE). The vector output is used if the regexes need to be combined with other regexes. If they do not, then they are anchored with ^ and $ and separated with | (OR).
Whether to allow strings of only date. If FALSE, the regular expression accepts patterns where text can come before or after the date().
Either a single regex string or a vector of them
The DATE (and subsequent DATE_CALENDAR) pattern can potentially handle several different calendar types, but this package has only implemented the Gregorian calendar.