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
______________________________________________________________________
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
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