There is also a generic UDF at cflib.org called NextOccOfDOW

http://www.cflib.org/udf.cfm?ID=175

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Brad Roberts [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, June 13, 2002 2:37 PM
> To: CF-Talk
> Subject: RE: Next 4 Saturdays
> 
> 
> Thanks Billy... I was just thinking I should put this in a 
> UDF, and you go
> and spoil my fun :) kidding.
> 
> 
> > -----Original Message-----
> > From: Cravens, Billy [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 13, 2002 2:40 PM
> > To: CF-Talk
> > Subject: RE: Next 4 Saturdays
> >
> >
> > Grab today - get the day of the week, use this to find the 
> next Saturday
> > - then loop using DateAdd() to grab the next 3 Saturdays after that
> >
> > Blind code (coding from memory, not tested):
> >
> > <cfscript>
> > function next4sat() {
> >     listDates = "";
> >     theDate = now();
> >     thisDay = datePart(dw,theDate);
> >     theDate = dateAdd(d,(6-thisDay),theDate);
> >     listAppend(listDates, theDate);
> >     for (i=1;i lte 3; i = incrementValue(i)) {
> >             theDate = dateAdd(w,1,theDate);
> >             listAppend(listDates,theDate);
> >     }
> >     return listDates;
> > }
> > </cfscript>
> >
> > will return a list containing your 4 dates.
> >
> > ---
> > Billy Cravens
> >
> >
> > -----Original Message-----
> > From: Brad Roberts [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 13, 2002 1:24 PM
> > To: CF-Talk
> > Subject: Next 4 Saturdays
> >
> > I need to display the next 4 Saturday's dates in a select 
> box.  Anyone
> > have
> > any ideas for a "neat" solution?
> >
> > -Brad
> >
> >
> > 
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to