Another pseudo code way to do this...
Set date=Jan 1, yourYear
loop
if DayOfWeek(date)=yourDay then exit loop
date=DateAdd(d,1,yourDate)
end loop
// Assert that date is earlier than Jan 8th
// You have the first date
loop
date=DateAdd(d,7,yourDate)
exit when DatePart(yyyy, date) is not yourYear
// you have the next date
end loop
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 2:59 PM
To: CF-Talk
Subject: return every Friday for a year
Hope this is a quick and easy one... what would be the simplest way to
return the dates for every Friday in a given year? (or any other particular
day of the week)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists