I wrote an app that allows the user to enter a "start" date, and an "end" date the code then calculates the number of days between those date (inclusive) and then uses that number to create calendar dates for a particular event (leave or training). It also subtracts out weekends (sat and sun) for display purposes. It's kinda crude (I am fairly new to CF) and the code looks U.G.L.Y...but it does work.
Jon -----Original Message----- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 14, 2003 9:33 AM To: CF-Talk Subject: RE: How to handle Calendar Scheduling of Recurring Events? I am not sure, I am waiting on WebGuy's solution..... -----Original Message----- From: Scott Wilhelm [mailto:[EMAIL PROTECTED]] Sent: 14 January 2003 14:25 To: CF-Talk Subject: RE: How to handle Calendar Scheduling of Recurring Events? Rick: One way I did it in a previous application was to have the person select the duration of the event...If it was a single day event, the start date & end date were the same in the DB. Then, in the field below, I would ask what days it occurs on (ie. Monday, Tuesday, etc.) The values for each check box were the numerical values of the day of the week. Then, when the calendar processes, it checks each day that it's displaying if there are any events...It would then find that all those days there might be something to display. Then check to be sure that the current day it's processing is selected for weekdays. Let's say the event went from 1/6/03 to 1/13/03 and the user select M,W,F. The way I had the calendar setup was that for each day it would search the database...So for 1/1, call to the db & check for events, 1/2, call to the db & check for events, etc. Once it got to 1/6, it would see that there's an event that it might be able to display...Then it checks the weekday values and sees that the 6th is a Monday and falls within what the user defined...Then onto 1/7...it would then find that it does fall within the time span, but Tuesday's not listed...And so on... Did I confuse anyone? If there's a better way to do this, I'd love to hear.... HTH, Scott -----Original Message----- From: Rick Faircloth Sent: Tue 01/14/2003 09:06 AM To: CF-Talk Cc: Subject: How to handle Calendar Scheduling of Recurring Events? Hi, all. I was wondering about the various approaches that have been taken to scheduling recurring events in a calendar? I haven't worked with auto-insertion of recurring events, but now is the time for my calendar creation to become more sophisticated. Should I insert data for "one-time" events in one table and data for "recurring" events in another with the user specifiying daily, weekly, monthly, quarterly, yearly, etc...and have code that checks that table and auto-inserts those events when the day/dates are checked? How would I handle the City Council meeting that is scheduled on "the 2nd Tuesday of each month." Would I have the person inputting the data fill out or check fields for "1st, 2nd, 3rd, etc.", then "Tuesday, Wednesday, etc.", each "Week, Month, Year" or whatever? (That could get really complicated...) Just let them handle that kind of insertion manually? Perspectives? (If anyone knows of any tutorials that address this subject, a link would be most appeciated!) Thanks, and good morning! Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

