hi.
i'm building a scheduler app for people who need infusions over a 1 year
period. a user selects the following info to begin:
1. a starting date for first infusion - day, month, and year
2. number of infusions - 1-4
3. frequency of infusions - every 1, 2, 3, or 4 weeks.
i have to come up with a schedule of infusion dates over the next 13 months.
the breakdown of infusion frequency goes like this:
CASE 1: user selects infusions per 1 week period.
a. 1 infusion every week -> increment every 7 days
b. 2 infusions "" -> increment every 4 days
c. 3 infusions "" -> increment every 2 days
d. 4 infusions "" -> alert ("max 3 infusions/week" );
CASE 2: user selects infusions per 2 week period.
a. 1 infusion every 2 weeks -> increment every 14 days
b. 2 infusions "" -> increment every 7 days
c. 3 infusions "" -> increment every 4 days
d. 4 infusions "" -> increment every 4 days
CASE 3: user selects infusions per 3 week period.
a. 1 infusion every 3 weeks -> increment every 21 days
b. 2 infusions "" -> increment every 10 days
c. 3 infusions "" -> increment every 7 days
d. 4 infusions "" -> increment every 5 days
CASE 4: user selects infusions per 4 week period.
a. 1 infusion every 4 weeks -> increment every 28 days
b. 2 infusions "" -> increment every 14 days
c. 3 infusions "" -> increment every 9 days
d. 4 infusions "" -> increment every 7 days
the way i figured to do it would be to capture the starting day and month and
then calculate ( based on number of infusions and frequency ) every other day
and month over a 13 month period. i'd throw all of these values into an
'infusionDates' array and then i can loop over them and change the properties
of the DateChooser that i need.
i just need help figuring out how to populate the infusionDates array. can
anyone help me get started, please?
thanks for any tips. -- matt.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com