Six digits: a four-digit year (1900-2099) followed by a two-digit month
(01-12), e.g. a fiscal reporting period like 201912. Constrained to a sane
year window and a valid month so it does not swallow arbitrary six-digit
counts.
See also
Other datetime detectors:
is_abbr_month_date(),
is_clock_time(),
is_date(),
is_date_range(),
is_day_of_week(),
is_fiscal_year(),
is_hijri_date(),
is_iso_date(),
is_iso_datetime(),
is_long_date(),
is_month_day(),
is_month_of_year(),
is_month_year(),
is_quarter(),
is_rfc2822_datetime(),
is_us_date(),
is_us_datetime()
Examples
is_yyyymm(c("201912", "201301", "201913", "2019", NA))
#> [1] TRUE TRUE FALSE FALSE NA