Skip to main content
Inspiring
March 11, 2010
Question

Need to display days for every "X" weeks

  • March 11, 2010
  • 1 reply
  • 515 views

I have start and end dates, along with specific days of the week that I'm outputting.

However, I need to display them every "X" week but I'm not sure how to do that.

For example: show Monday, Wednesday, and Friday for every 2 weeks (or every 3, 4,5 weeks).

Can someone shed some light?

TIA

This topic has been closed for replies.

1 reply

BalanceAuthor
Inspiring
March 22, 2010

Anyone have any thoughts on this?

Thanks

ilssac
Inspiring
March 22, 2010

Another option, depending on what you are really trying to do.

Loop from day A to day B.

If current itteration of the day is a designated day of the week [dayOfWeek(currentDay)] do one thing, else do another.

If current itteration of the day is the end of the week [I.E. dayOfWeek(currentDay) is 7] then break the display to a new week.

There are probably other ways to do this as well.  The date time functions could probably give you some ideas.

http://livedocs.adobe.com/coldfusion/8/htmldocs/functions-pt0_05.html#1098968