Hi

someone posted this a while back .. I played with it a bit

it may help you
its also clientside so you save a server call


re = new RegExp("^(0?[1-9]|[1-2][0-9]|3[0-1])[/.-](0?[1-9]|1[0-2])[/.-](1)?[0-9]{4}$", "gi");

it checks for syntactically valid eurodates

this means it wont catch 31/02/2000

but it will catch 02/31/2000

have fun

Matt

At 16:42 12/02/2003 +0000, you wrote:

Hi,
All i really want to do is check that a date is a valid *uk* date.

Kola

>> -----Original Message-----
>> From: Snake [mailto:[EMAIL PROTECTED]]
>> Sent: 12 February 2003 16:09
>> To: [EMAIL PROTECTED]
>> Subject: RE: [ cf-dev ] date locale question
>>
>> What exactly do you need them for, I have never really found a use
for
>> it.
>> If a user is in a different timezone, i get them to select this and
>> calculate the difference from server time. Or I grab the time from
their
>> machine via Javascript.
>>
>> -----Original Message-----
>> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
>> Sent: 12 February 2003 16:17
>> To: [EMAIL PROTECTED]
>> Subject: RE: [ cf-dev ] date locale question
>>
>>
>> Anyone got a healthy replacement?
>>
>> Kola
>>
>> >> -----Original Message-----
>> >> From: Snake [mailto:[EMAIL PROTECTED]]
>> >> Sent: 12 February 2003 16:00
>> >> To: [EMAIL PROTECTED]
>> >> Subject: RE: [ cf-dev ] date locale question
>> >>
>> >> Don't use any of the locale specific date functions, they are
buggy
>> as
>> >> hell,
>> >> mainly due to windows but there you go
>> >>
>> >>
>> >> -----Original Message-----
>> >> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
>> >> Sent: 12 February 2003 15:23
>> >> To: [EMAIL PROTECTED]
>> >> Subject: RE: [ cf-dev ] date locale question
>> >>
>> >>
>> >> Go on rub it in!
>> >>
>> >>
>> >> Taz, thanks so LSisDate determines if it can be converted into a
date
>> >> but not whether it's a valid date!
>> >>
>> >> Oh well of to cflib.....
>> >>
>> >>
>> >> Thanks
>> >>
>> >> Kola
>> >>
>> >> >> -----Original Message-----
>> >> >> From: Christopher Dawes
>> [mailto:[EMAIL PROTECTED]]
>> >> >> Sent: 12 February 2003 14:41
>> >> >> To: Kola Oyedeji
>> >> >> Subject: Re: [ cf-dev ] date locale question
>> >> >>
>> >> >> Hello Kola,
>> >> >>
>> >> >>   You're using CF 5.x or earlier aren't you...hehe...
>> >> >>
>> >> >> Kind Regards,
>> >> >> Christopher Dawes
>> >> >> Dawes International
>> >> >>
>> >> >> Thursday, February 13, 2003, 1:36:23 AM, you wrote:
>> >> >>
>> >> >>
>> >> >> KO> Hi
>> >> >>
>> >> >> KO> Can anyone explain to me why the following returns yes and
not
>> >> no..
>> >> >>
>> >> >> KO> <cfset tmp = setlocale("English (UK)") >
>> >> >> KO> <cfset dt = LsisDate("01/19/2003") >
>> >> >>
>> >> >> KO> 1/19 should be an invalid date for the specified locale?
>> >> >>
>> >> >> KO> Thanks
>> >> >>
>> >> >> KO> Kola
>> >> >>
>> >> >>
>> >> >> --
>> >> >> ** Archive:
>> >> http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>> >> >>
>> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> >> For additional commands, e-mail:
[EMAIL PROTECTED]
>> >> >> For human help, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >> --
>> >> ** Archive:
>> http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>> >>
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> For human help, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >> --
>> >> ** Archive:
>> http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>> >>
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> For human help, e-mail: [EMAIL PROTECTED]
>>
>>
>> --
>> ** Archive:
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>>
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> For human help, e-mail: [EMAIL PROTECTED]
>>
>>
>> --
>> ** Archive:
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>>
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> For human help, e-mail: [EMAIL PROTECTED]


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to