Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 123708
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: dean [...] fragfest.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 6.60
Fixed in: (no value)



Subject: ::Recur Doesnt guard against insane dates
In the following example, i ask ::Recur to match on the 31st of November each year. This date doesnt exist. The result is that ::Recur->dates() spews warnings forever in a loop. Perhaps the best behavior is to return nothing, or throw an error when parsing? --- #/usr/bin/env perl use warnings; use strict; use Date::Manip::Date; my $freq = '0*11:0:31:0:0:0'; # Y:M:W:D:H:MN:S my $start = Date::Manip::Date->new_config(['setdate','now,Australia/Sydney']); $start->parse('now'); print $start->printf('start %d/%m/%Y %Z'),"\n"; my $end = $start->new('2028-11-22'); print $end->printf('end %d/%m/%Y %Z'),"\n"; my $recur = $start->new_recur(); my $err = $recur->parse($freq); print $recur->frequency,"\n"; #my $err = $recur->parse($freq,$start,$start,$end); my @dates = $recur->dates($start,$end); print $_->printf(' - %d/%m/%Y %Z'),"\n" for @dates;
Thanks for the report. This is now fixed and will be in the next release.