Skip to main content
Known Participant
June 3, 2006
Question

Generating Weeks throughout year

  • June 3, 2006
  • 2 replies
  • 239 views
I would like to generate the loop which will show the dates from starting of week to end of the week. Something like this:

May 30 - Jun 05 2006
June 06 - Jun 12 2006
June 13 - June 19 2006
Jun 20 - June 26 2006
Jun 27 - Jul 03 2006
Jul 04 - Jul 10 2006

Is it possible? Please help.
    This topic has been closed for replies.

    2 replies

    Inspiring
    June 3, 2006
    DateStart = "2006-05-30";
    DateEnd = DateAdd("d", 6, DateStart);
    MaxDate = "2006-07-10";
    </cfscript>
    <cfoutput>
    <cfloop condition = "DateEnd lte MaxDate">
    #DateStart# #DateEnd#<br />
    You can do the rest.
    DDhillonAuthor
    Known Participant
    June 3, 2006
    Actually I want to start it from May 30