SBECK-github / Date-Manip

Other
10 stars 11 forks source link

Date::Manip::Recur question #12

Closed PJ-DSI-DevOps closed 7 years ago

PJ-DSI-DevOps commented 7 years ago

I'm using date() on a Date::Manip::Recur to retrieve some occurences of a recurring event.

Here is my example :

my $recur = new Date::Manip::Recur;
my $err = $recur->parse('*1990-1995:12:0:1:0:0:0');
my @dates = $recur->dates('1992-01-01', '1994-12-31');

It works well if I don't specify the range when calling dates(), but in my case I want them to be within a specifc sub-range (1992 to 1994).

SBECK-github commented 7 years ago

You found a bug. When there is nothing left of the '*" in the recurrence, the dates method was not allowing you to pass in a start and end date. I hadn't caught that because it's rare to have such a recurrence... but it is definitely allowed.

I've fixed this and it will be in the next release (scheduled for tomorrow).