CC: | sally.gewalt [...] duke.edu |
Subject: | iCal::Parser bugs: events starting at 0000 on end-date, events spanning month boundary |
Date: | Mon, 13 Jul 2009 15:20:15 -0400 |
To: | bug-ical-parser [...] rt.cpan.org |
From: | Jeffrey L Brandenburg <jeff.brandenburg [...] duke.edu> |
Hello --
I'm a Perl neophyte working with iCal::Parser as part of a
resource-usage-reporting application. I've found what appear to be two
bugs.
Events that start at 0000 on the end-date I pass as an argument to new()
get included improperly. I think that this line in VEVENT:
return if $start > $self->{span}->end;
should instead be
return if $start >= $self->{span}->end;
...but I'm not sure whether this is comparing the event's start to the
interval's end, or vice-versa (in which case my "fix" is wrong).
Events which span the end of a month don't get broken down into individual
days as they should. The problem appears to be in this line:
if (!$e{allday} && $end->day > $start->day) {
It looks like this should be something like
if (!$e{allday} && ($end->day > $start->day) || ($end->month >
$start->month) || ($end->year > $start->year)) {
I'm going to try to patch this in my local installation, but as I said,
I'm a Perl neophyte, and I'm not especially confident. If anybody is
still interested in maintaining this code for iCal victims like myself,
I'm very grateful. Thanks!
--
-jeffB (Jeff Brandenburg, Duke Center for In Vivo Microscopy)