Subject: | hang creating biweekly intervals with sunday start |
Using Perl v5.8.0 on Sun
DateTime::Event::ICal version .07
The following code just hangs when attempting to create the ICal set:
#!/usr/local/bin/perl
use strict;
use Time::Local;
use DateTime;
use DateTime::Event::ICal;
my $dt = DateTime->new( year => '2004',
month => '05',
day => '23',
time_zone => 'GMT');
my $set = DateTime::Event::ICal->recur(dtstart => $dt,
count => 2,
freq => 'weekly',
interval => 2,
byday => [ 'mo' ] );
my $nextDt = $set->next($dt);
print $nextDt->datetime . "\n";
Changing start day to any day other than a Sunday succeeds, and not all
Sundays fail .. but for this example, 5/23 and 5/09 hang every time. I've
tried this pattern with other days (for example, where the byday value is 'we' and dtstart is 5/25) and can't get it to fail, but haven't tried
them all, so I'm not sure if it's limited to Sunday starts or not. It also succeeds if I remove the interval.