Displaying page
of
pages;
Items to
Title |
Test
Details
Date Regex
|
Expression |
^(?!0?2/3)(?!0?2/29/.{3}[13579])(?!0?2/29/.{2}[02468][26])(?!0?2/29/.{2}[13579][048])(?!(0?[469]|11)/31)(?!0?2/29/[13579][01345789]0{2})(?!0?2/29/[02468][1235679]0{2})(0?[1-9]|1[012])/(0?[1-9]|[12][0-9]|3[01])/([0-9]{4})$
|
Description |
Validates dates in the format MM/DD/YYYY, M/D/YYYY, or any permutation in between. Takes into account leap year as well as the rule that century marks are leap years only if they are divisible by 400.
|
Matches |
1/30/2012 | 2/29/2012 | 02/29/2400
|
Non-Matches |
04/31/2000 | 02/29/2100 | 2/30/2012
|
Author |
Rating:
Nick Gent
|
Displaying page
of
pages;
Items to