Skip to contents

Generate a regular expression for ISO 8601 timezones.

Usage

pattern_ISO8601_timezone()

Details

Offsets are always multiples of 15 minutes, so if the minute part is provided, it must be 00, 15, 30, or 45. The range allowed by this function is a bit wider than the current range as of the writing of this function. The allowed range is -14:45 to +14:45 while the actual widest range is currently -12:00 to +14:00.

According to the ISO standard, zero must always be preceded by a + and never a negative. And, "Z" is allowed.

References

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