Return to Snippet

Revision: 12915
at April 1, 2009 09:50 by indamix


Updated Code
(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

*/

Revision: 12914
at April 1, 2009 09:48 by indamix


Updated Code
(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[012])\.(19|20)\d\d

/*

01.04.2009 true
01.04.1909 true
01.04.09   false
01-04-2009 false
02.32.2009 false
02.21.2109 false

To pass dates like 01-04-2009 and 01 04 2009 use:
(0[1-9]|[12][0-9]|3[01])[ \.-](0[1-9]|1[012])[ \.-](19|20)\d\d

To pass dates like 01.04.09 and 01-04-09 use:
(0[1-9]|[12][0-9]|3[01])[ \.-](0[1-9]|1[012])[ \.-](19|20|)\d\d

*/

Revision: 12913
at April 1, 2009 09:44 by indamix


Updated Code
(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])\.(19|20)\d\d

/*

01.04.2009 true
01.04.1909 true
01.04.09   false
01-04-2009 false
02.32.2009 false
02.21.2109 false

To pass dates like 01-04-2009 and 01 04 2009 use:
(0[1-9]|1[012])[ \.-](0[1-9]|[12][0-9]|3[01])[ \.-](19|20)\d\d

To pass dates like 01.04.09 and 01-04-09 use:
(0[1-9]|1[012])[ \.-](0[1-9]|[12][0-9]|3[01])[ \.-](19|20|)\d\d

*/

Revision: 12912
at April 1, 2009 09:43 by indamix


Updated Code
(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])\.(19|20)\d\d

/*

01.04.2009 true
01.04.1909 true
01.04.09   false
01-04-2009 false
02.32.2009 false
02.21.2109 false

To pass dates like 01-04-2009 or 01 04 2009 use:
(0[1-9]|1[012])[ \.-](0[1-9]|[12][0-9]|3[01])[ \.-](19|20)\d\d

To pass dates like 01.04.09 use:
(0[1-9]|1[012])[ \.-](0[1-9]|[12][0-9]|3[01])[ \.-](19|20|)\d\d

*/

Revision: 12911
at April 1, 2009 09:42 by indamix


Initial Code
(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])\.(19|20)\d\d

Initial URL

                                

Initial Description

                                

Initial Title
RegExp test for date in DD.MM.YYYY format

Initial Tags
javascript, regexp

Initial Language
JavaScript