Created
October 3, 2016 21:22
-
-
Save webpapaya/3142fc3b7150a776d68286b64d2678ae to your computer and use it in GitHub Desktop.
Validate iso8601 date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^[+-]?\d+\b$|^[+-]?\d+\b-[+-]?\d{2}$|^[+-]?\d+\b-[+-]?\d{2}-[+-]?\d{2}$|^[+-]?\d+\b-[+-]?\d{2}-[+-]?\d{2}[\sT][+-]?\d{2}$|^[+-]?\d+\b-[+-]?\d{2}-[+-]?\d{2}[\sT][+-]?\d{2}:[+-]?\d{2}$|^[+-]?\d+\b-[+-]?\d{2}-[+-]?\d{2}[\sT][+-]?\d{2}:[+-]?\d{2}:[+-]?\d{2}(\.\d+)?$|^[+-]?\d+\b-[+-]?\d{2}-[+-]?\d{2}[\sT][+-]?\d{2}:[+-]?\d{2}[+-]\d{2}(:\d{2})?|Z$|^[+-]?\d+\b-[+-]?\d{2}-[+-]?\d{2}[\sT][+-]?\d{2}[+-]\d{2}(:\d{2})?|Z$|^[+-]?\d+\b-[+-]?\d{2}-[+-]?\d{2}[\sT][+-]?\d{2}:[+-]?\d{2}:[+-]?\d{2}(\.\d+)?[+-]\d{2}(:\d{2})?|Z/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment