Title |
Test
Find
Pattern Title
|
Expression |
^((\d{2}((0[13578]|1[02])(0[1-9]|[12]\d|3[01])|(0[13456789]|1[012])(0[1-9]|[12]\d|30)|02(0[1-9]|1\d|2[0-8])))|([02468][048]|[13579][26])0229)$ |
Description |
Date expression validator with format YYMMDD
Validates leap years.
Of course, as year has only 2 digits, it's not possible to invalidate years like 2100, 2200, 2300, etc as a non-leap years ! |
Matches |
751231 | 000229 | 040229 |
Non-Matches |
750431 | 010229 | 050229 |
Author |
Rating:
Dany Lauener
|
Source |
mailto:[email protected] |
Your Rating |
|
Title: Updated for three letter month
Name: AlbertM
Date: 12/8/2020 8:54:46 PM
Comment:
Hi there, here's a possible update to validate with the three letter month?
((\d{2}((0[13578]|1[02]|[janmryulgoctdepnvJANMRYULGOCTDE]{3})(0[1-9]|[12]\d|3[01])|(0[13456789]|1[012]|[janmryulgoctdepnvJANMRYULGOCTDEPNV]{3})(0[1-9]|[12]\d|30)|(02|[febFEB]{3})(0[1-9]|1\d|2[0-8])))|([02468][048]|[13579][26])0229)
Title: Updated for three letter month
Name: AlbertM
Date: 12/8/2020 8:27:57 PM
Comment:
Hi there, here's a possible update to validate with the three letter month?
((\d{2}((0[13578]|1[02]|[janmryulgoctdepnvJANMRYULGOCTDE]{3})(0[1-9]|[12]\d|3[01])|(0[13456789]|1[012]|[janmryulgoctdepnvJANMRYULGOCTDEPNV]{3})(0[1-9]|[12]\d|30)|(02|[febFEB]{3})(0[1-9]|1\d|2[0-8])))|([02468][048]|[13579][26])0229)