Subject: | Recurring event fails when startday equals endday |
Date: | Wed, 05 Jun 2013 11:58:23 +0200 |
To: | bug-iCal-Parser [...] rt.cpan.org |
From: | Pip Oomen <pepijn [...] redpill-linpro.com> |
iCal::Parser 1.16 fails to correctly calculate the difference between
start- and end-date, because it is relying on:
$diff=$end-$start
one of the correct ways to do this calculation is:
$diff=int($end->subtract_datetime_absolute($start)->delta_seconds /
(24*60*60));
ref:
http://stackoverflow.com/questions/821423/how-can-i-calculate-the-number-of-days-between-two-dates-in-perl
The attached patch fixes this issue.
--
Pip Oomen
Redpill Linpro AS - Changing the game!
Message body is not shown because sender requested not to inline it.