in reply to Re: A question to iterator in Datetime::Event::Recurrence
in thread A question to iterator in Datetime::Event::Recurrence
Thank you very much!
Ditch DateTime::Event::Recurrence :)
Now after I have tried so much to familiarize to it? :-)
The task is to calculate the bed occupancies in a unit to every certain hour. The start and the end points are known, the iterator generates the hours and then I use $hash{$dt->datetime()}{$id}[0] = 1 for each hour (to sum it later).
The print was used just to debug.
The way around could be to use
Thanks again!
VE
Ditch DateTime::Event::Recurrence :)
Now after I have tried so much to familiarize to it? :-)
The task is to calculate the bed occupancies in a unit to every certain hour. The start and the end points are known, the iterator generates the hours and then I use $hash{$dt->datetime()}{$id}[0] = 1 for each hour (to sum it later).
The print was used just to debug.
The way around could be to use
but since I am learning I would like to use the mainstream and not the way around.while ( my $dt = $it->next() ) { print $dt->datetime(), "\n" if ($dt->hour > 6 and $dt->hour < 23); }
Thanks again!
VE
In Section
Seekers of Perl Wisdom