> -----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 the line:

Is the requirement to match the code exactly?

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 or year % 400 eq 0));

Again this is just doing something manually that CF provides automatically -
namely the "isLeapYear()" function.

If your requirement is to match the code exactly then fine, but if not then
you can make things much simpler using the pre-defined CF datetime
functions.

Jim Davis


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296504
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to