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
>
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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