On Fri, 7 Mar 2003, fglock wrote: > An example, using a "monthly" recurrence: > > # $set = 20030205 until 20030606 > # $recurr_months = months, from -inf until inf > # > print $set->intersection( $recurr_months ); > # output: 20030301, 20030401, 20030501, 20030601 > > Although $recurr_months was defined as "start=>NEG_INFINITY", > the equation solver inside Set::Infinite will substitute > that for "start=>20030201". Otherwise it would not find > an answer. > > The "20030201" value is found by applying a truncation on > the 20030205 value. > > If you do not provide a "truncator", I have to disable the > equation solver and the program will have to iterate from > "start" to whatever date you need, even if that date > is a million years later.
All this requires is that there be a DateTime->truncate method, not that the iterator take one as a parameter. The level of truncation needed can be calculated pretty easily. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
