Re: translate js function to cfscript

2008-01-13 Thread Richard White
Hi, i have done most of it but the difficulty i am having is, like i said, with the pattern matching and also the line: isleap = (year % 4 eq 0 and (year % 100 neq 0 or year % 400 eq 0)); mainly the % signs thanks ~| Adobe®

Re: translate js function to cfscript

2008-01-13 Thread Charlie Griefer
% is the mod operator in cf. year mod 4 ('year', btw isn't really a good variable name... it's also the name of a built in function. same for day and month). On Jan 13, 2008 11:05 AM, Richard White [EMAIL PROTECTED] wrote: Hi, i have done most of it but the difficulty i am having is, like i

Re: translate js function to cfscript

2008-01-13 Thread Richard White
ok great thanks very much, i will make those changes now: have you ever done pattern matching in cf charlie as that the only other bit now that i am a bit shady on? thanks again ~| Adobe® ColdFusion® 8 software 8 is the most

RE: translate js function to cfscript

2008-01-13 Thread Jim Davis
-Original Message- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Sunday, January 13, 2008 2:06 PM To: CF-Talk Subject: Re: translate js function to cfscript Hi, i have done most of it but the difficulty i am having is, like i said, with the pattern matching and also

Re: translate js function to cfscript

2008-01-13 Thread Richard White
lol, Jim - thanks for waking me up. i have been working so hard that i think my brain has gone to sleep :) thanks very much i will use the isDate() function ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic

RE: translate js function to cfscript

2008-01-13 Thread William Seiter
The pattern is simply verifying that the numbers in the new array are valid date entries. If you just wanted to recreate this function... You can use. Matcharray = listtoarray(dateStr, /) and If arraylen(matcharray) neq 3 Thisday = matcharray[2]; thismonth = matcharray[1]; thisyear =

Re: translate js function to cfscript

2008-01-13 Thread Charlie Griefer
On Jan 13, 2008 12:19 PM, Jim Davis [EMAIL PROTECTED] wrote: Honestly all that pattern matching is doing is attempting to determine if a date has been entered. CF's isDate() function will do the same work but allow a much broader range of entry. isleap = (year % 4 eq 0 and (year % 100 neq 0

Re: translate js function to cfscript

2008-01-13 Thread Richard White
Thanks william, this makes me understand how it was done in the first place now. thanks very much richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial