OK, I'm working on building my own calendar application.

I'm trying to come up with a way of dealing with recurrence.

The first step is to calculate -- event occures every n days apart, i.e.,
event occures every 3 days.

Here's one way I've tried so far (but this is like chewing up all the
processor time)

variables.date = ArrayNew(1);
variables.date[1] =  "#form.month#/#form.day#/#form.year#";
        for(i=1; i LTE 30; i=i+1) {
        x=1;
                while (i  mod form.TIME_INTERVAL){
                variables.date[x] = DateAdd("d", (form.TIME_INTERVAL-1)+x,
variables.date[1]);
                x=x+1;
        }
        }

Something else I tried, but it creates too many empty array elements:

variables.date = ArrayNew(1);
variables.date[1] =  "#form.month#/#form.day#/#form.year#";
        for(i=1; i LTE 30; i=i+1) {
                if (i  mod TIME_INTERVAL){
                                         
}
                else {
                        variables.date[i] = DateAdd("d",
(TIME_INTERVAL-1)+i, variables.date[1]);        
}
}

I'm open to suggestions.

H.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Owens
Internet Operations Coordinator
InsideVC.com/Ventura County Star
[EMAIL PROTECTED]
AIM: GoCatGo1956
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to