Not sure if I noted how I ended up making his work. Once I have the number of days that an event spans I then will span the table cells of his calendar. If it exceeds what is available for that row then I move onto the next until I either come to an end of days or the end of the display. He wanted it so it can display just by day, week, or month. I always wanted to go back and make it build the display off an array just never had the time to do it. This was not my project and just one I got brought into late in the build to "make it work"
On 8/9/06, Eric Roberts <[EMAIL PROTECTED]> wrote: > > I have a field in the db where it stores stuff like 1st Mondays, 2nd > Wednesdays, etc...I never did take into account a weekly event or the last > <insert day> of the month. Always meant to do so, but never got around to > it. Anyhow...with that info, you can base you calc of the numeric day of > week based off of the first day of the week to come up with the actual > date. > One way would be to go through the db and look for dates within the > appropriate time frame and them load them into an array and use the array > to > populate the calendar. I use a table to display the calendar. I assign > the > first element of the array to the fist data cell of the table(ie the first > row, Sunday). If the 1st day of the month is on a Tuesday, Sunday would > have a date value of -1 and Monday would have value of 0. I first check > to > see if the value is gt 0 and then that is where I start numbering and > filling in data. I also predetermine the dates for the 1st Mondays, etc > by > creating constants the value of the appropriate day of the month. So if > the > 1st Sunday is the 2nd, sun1=2.... I basically took into account 1st, 2nd, > 3rd, 4th, and if appropriate...5th <day> of the month. > > Eric > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249393 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

