There are several ways to do this. For example:
use DateTime::Event::Recurrence;
use strict;
my $daily_at_10_30 = DateTime::Event::Recurrence->daily(
hours => 10,
minutes => 30);
my $iter = $daily_at_10_30->iterator(
after => DateTime->new(
year => 2007,
month => 1, day => 15, hour => 11
) );
for(my $i = 0; $i < 5; $i++)
{
print $iter->next->datetime . "\n";
}
Eventually what I will need to do is compare the ->next recurrence with
the current (local) datetime and if the ->next is less than that, get
next recurrence.
I think this is:
$daily_at_10_30->next( $local_time )
- Flavio S. Glock