> 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)
This probably ain't the most elegant or optimized approach, but it works :)
<cfset startdate=now()>
<cfoutput>
<cfloop from="0" to="365" index="ii">
<!--- dayofweek returns a number, 1=Sunday, 2=Monday, etc --->
<cfif dayofweek(dateadd("d",ii,startdate)) is 6>
#dateadd("d",ii,startdate)#<br>
</cfif>
</cfloop>
</cfoutput>
- Sean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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