I can't do a full algorithm right now, but here is what I woud do for a fast
and dirty solution:

Get the year (Either a Form, URL or default variable)
Loop from 1 to 12 (i)
    Get days in Month (GetDaysInMonth() function in
        CF) for current index
    Loop from 1 to DaysInMonth (j)
        Create a Date object (CreateDate() function in
           CF) with the yesr, i and j
        Get the day of the week (GetDayOfWeek()
           function in CF)
        Is it Friday?
            Output the date

Not very efficient, but the best I can do right now.

============================================================
  Russel Madere, Jr.         Senior Web Developer
  ICQ: 5446158               http://www.TurboSquid.com

Some days you eat the bear; some days the bear eats you.
============================================================


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 11, 2001 13:59
> 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

Reply via email to