Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-05-10 06:57
Flavor·ECMAScript (JavaScript)

/
^(19[789]\d|2\d{3})-((0[13578]|1[02])-([0-2]\d|3[01])|02-[0-2]\d|0[469]|11-([0-2]\d|30))T([01]\d|2[0-4])(:[0-5]\d){2}Z$
/
Open regex in editor

Description

regex for iso 8601 date between 1970 and 2999 that match only valid date, the only mistake possible in this regexp is the bisextile year how are not checked

Submitted by KurayamiNoDaiTenshi