Skip to contents

Generate a regular expression matching an ISO8601 calendar year

Usage

pattern_ISO8601_calendar_year(allow_before_year_1583 = FALSE)

Arguments

allow_before_year_1583

Should years between 0 and 1582 be allowed (they are only allowed in ISO 8601 with mutual agreement)

Details

Sign on the year (+ or -) is not supported (therefore years before 0000 are not supported). Years after 9999 are not supported.

References

https://en.wikipedia.org/wiki/ISO_8601