/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[012])\.(19|20)\d\d /* 21.04.2009 true 21.04.1909 true 21.04.09 false 21-04-2009 false 22.32.2009 false 22.21.2109 false To pass dates like 21-04-2009 and 21 04 2009 use: (0[1-9]|[12][0-9]|3[01])[ \.-](0[1-9]|1[012])[ \.-](19|20)\d\d To pass dates like 21.04.09 and 21-04-09 use: (0[1-9]|[12][0-9]|3[01])[ \.-](0[1-9]|1[012])[ \.-](19|20|)\d\d */