Would it not be easier, to hold the images in a seperate directory. Then
using the cfdirectory to build an array of images for your use......... I
did something similar for a slide show on another project many years ago....

http://www.wildthing.iaccess.com.au/slideshow.html

regards

Andrew Scott
Senior Cold Fusion Application Developer



-----Original Message-----
From: Barry Smith [mailto:[EMAIL PROTECTED]]
Sent: 04 January 2001 07:30
To: CF-Talk
Subject: RE: Adding and removing dates. Y21K compliant?


That's awesome Ray. I had tried the DATEADD, since I felt it was more
elegant, but I used the PARSEDATE and just added or removed the TIMESPAN. 

I have included your code, but the only caveat I have is I still need to
have the dates formatted in "YY-MM-DD" since that is how I have named the
images and that is how they are called.

00-10-18        Oct. 18, 2000
00-10-19        Oct. 19, 2000
00-10-20        Oct. 20, 2000
00-10-21        Oct. 21, 2000
etc.

The DATEADD you wrote works great and I was able to streamline my code, but
the error still shows up for any dates above Jan. 1, 2001.

Jan 2 and Jan 3 give me odd output. It almost seems as if the DATEFORMAT on
the NEXTTOON and LASTTOON is being ignored. But the code seems to work for
all other dates.

Barry T. Smith
GlobalSight Webmaster
http://www.globalsight.com


-----Original Message-----
From: rayt@qsystems [mailto:rayt@qsystems]
Sent: Wednesday, January 03, 2001 11:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Adding and removing dates. Y21K compliant?



New message has been posted in ColdFusion Support Conference

Forum:   Advanced Techniques
Thread:  Adding and removing dates. Y21K compliant?
Author:  Ray Thompson
Subject: Your Problem

URL:     http://forums.allaire.com/DevConf/Index.cfm?Message_ID=634464


Your problem is in the format of your date. You are using DD-MM-YY which,
when processed by the ParseDateTime() function views the date a MM-DD-YY.
You also should use DateAdd() rather than adding a number, such as a
TimeSpan to a date. I changed the date format in the code and simplified the
code. It now produces the correct date.


***** Accompanied HTML Code *****

<!--- If the URL.toon is not defined, default to today's cartoon --->
<CFIF NOT ISDEFINED("URL.toon")>
  <CFSET URL.TOON=DateFormat(NOW(),"MM-DD-YY")>
</CFIF>
<!--- If the archive toon is chosen, set the toon to the chosen archive
choice --->
<CFIF ISDEFINED("archive")>
  <CFSET URL.TOON=archive>
</CFIF>
<!--- Convert the URL.toon to add and subtract dates --->
<!--- Sets Time Span For One Day --->
<CFSET TOONFORMAT=PARSEDATETIME(URL.TOON)>
<CFSET NEXTTOON=DATEFORMAT(DateAdd("D",1,TOONFORMAT),"MM-DD-YY")>
<CFSET LASTTOON=DATEFORMAT(DateAdd("D",-1,TOONFORMAT),"MM-DD-YY")>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to