> It's going to depend a little on how the script works, but at a guess it's
> something like

> function Days2Xmas(date)
> {
> ...
> }

> This is probably in a file something like Days2Xmas.udf.

> If so, simply cfinclude the file.  Then you can treat Days2Xmas like any
> other CF function.  So, to figure how long from now to Christmas, you'd
> call
> something like

> <cfoutput>
> There are #days2xmas(now())# days until Christmas.
> </cfoutput>

I wouldn't recommend using .udf as a file extension -- folks here have used
inc ( which is a windows networking file extension iirc ) and .zml (
zoned-in markup language ) and it causes problems... I certianly advocate
descriptive file and directory names, but I'd go for something like:

udf_days2xmas.cfm

or better yet

mysite/cflib/days2xmas.cfm
or
mystie/_udf/days2xmas.cfm

and make sure all your udf's are in that directory. In the long run you'll
be gratefull for your udf's being organized this way.

S. Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to