Closed vitstradal closed 3 years ago
You have discovered a bug in the 'next' method, though not exactly the one you thought. Your example should not have reported anything (i.e. no warning, but also no date).
You have specified both a start and end date as 2015-06-01 (and remember that when specifying a date, if you don't give a time, it defaults to midnight). If I switch to using the 'dates' method (which does not suffer from the bug):
$r->start("2015-06-01,");
$r->end("2015-06-01,");
my @date = $r->dates();
foreach my $date (@date) {
say join (" ", $date->value);
}
and run it, it produces nothing. But if I change the end date to "2015-06-03", it produces:
2015 6 1 17 30 0
2015 6 2 17 30 0
The date range says that a recurring event will be:
start <= date <= end
So you have specified:
2015-06-01-00:00:00 <= date <= 2015-06-01-00:00:00
So your recurrence (every day at 17:30:00) clearly has zero matches. And the $r->dates() method shows that to be true. I'm going to fix the bug in the next method so it works correctly without a warning, but so it also won't return a date.
This is fixed now and will be corrected in the next release.
When I have same start and end date,
->next
works fine and as expected, but generates unexpcepted and unwanted warning: