SPUG: Date::Manip infinite loop

Thomas Sibley tsibley at cpan.org
Sun Jan 13 12:53:32 PST 2013


On 01/13/2013 09:45 AM, Joel Grow wrote:
> What's your recommendation to solve this? I simply want to iterate
> through N sequential days of a calendar (eg, 90 consecutive days,
> starting March 17).

I'd have simply started with DateTime:

use strict;
use warnings;
use DateTime;

my $date = DateTime->new( year => 2012, month => 3, day => 17 );

for (1..90) {
    print $date->ymd, "\n";
    $date->add( days => 1 );
}



More information about the spug-list mailing list