You're of course right, Rob... I was not focusing on the validity of the dates as much as the validity of the regex itself. Thanks for the link...
Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ ----- Original Message ----- From: "Rob Cozens" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 22, 2002 9:51 AM Subject: Re: RegEx for a date > >Here's what worked for me (verification on one line only): > > > >function CheckDate pDateToCheck > > if > >matchText(pDateToCheck,"(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9 ] > >[0-9][0-9])") is true then > > return pDateToCheck > > else > > return "Bad date" > > end if > >end CheckDate > > Ken, Yeves, et al: > > I'm not a regEx user, but doesn't the above accept as valid dates input like: > > * 30/02/2002 (Feb 30) > * 31/04/2002 (April 31) > * 29/02/2002 (Feb 29 on non leap years) > > etc.? > > The Serendipity Library validDate function will correctly validate > any date as correct or incorrect based on the system date format: > <http://www.oenolog.com/ftp/serendipity_downloader.htm>. > -- > > Rob Cozens > CCW, Serendipity Software Company > http://www.oenolog.com/who.htm > > "And I, which was two fooles, do so grow three; > Who are a little wise, the best fooles bee." > > from "The Triple Foole" by John Donne (1572-1631) > _______________________________________________ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-revolution > _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
