Need help writing a Recurrence class in PHP. The class is designed to calculate a next recurrence date based on a given date. For example...
[x] 1st; [ ] 2nd; [x] 3rd; [ ] 4th
[ ] Mon; [x] Tue; [ ] Wed; [ ] Thr; [x] Fri; [ ] Sat; [ ] Sun
[ ] Jan; [ x] Feb; [ ] Mar
[ ] Apr; [ ] May; [ ] Jun
[ ] Jul; [x] Aug; [ ] Sep
[ ] Oct; [ ] Nov; [ ] Dec
...Would create recurrence dates on the 1st and 3rd Tuesday and Friday in the months of February and August.
The idea is to instantiate the class with the recurrence criteria set then call a method $myRecurrence->getNextRecurrence( time( ) ); The method would return the next recurrence date.
So.... If time( ) is Feb 25, 2004 then calling getNextRecurrence() would return Aug 3, 2004.
Please let me know if you can help. Thanks.
[x] 1st; [ ] 2nd; [x] 3rd; [ ] 4th
[ ] Mon; [x] Tue; [ ] Wed; [ ] Thr; [x] Fri; [ ] Sat; [ ] Sun
[ ] Jan; [ x] Feb; [ ] Mar
[ ] Apr; [ ] May; [ ] Jun
[ ] Jul; [x] Aug; [ ] Sep
[ ] Oct; [ ] Nov; [ ] Dec
...Would create recurrence dates on the 1st and 3rd Tuesday and Friday in the months of February and August.
The idea is to instantiate the class with the recurrence criteria set then call a method $myRecurrence->getNextRecurrence( time( ) ); The method would return the next recurrence date.
So.... If time( ) is Feb 25, 2004 then calling getNextRecurrence() would return Aug 3, 2004.
Please let me know if you can help. Thanks.