Re: DateTime::Format::ICal bug : DTSTART value in recurrences not converted to DateTime

[email protected] ("Flavio S. Glock")
Newsgroups perl.datetime
Message-ID <[email protected]>
This is an intentional feature - DTSTART is not an RRULE component.

An iCalendar text looks like:

     DTSTART:19870405T020000
     RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4

reference: http://www.ietf.org/rfc/rfc2445.txt

Flávio S. Glock

2009/2/18 Olivier Mengué <[email protected]>:
> Hi,
>
> I have a problem with this expression (Second wednesday of every month, at
> 20:00) that I'm using with DateTime::Format::ICal->parse_recurrence() :
> FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T200000Z;COUNT=12
>
> Here is the test case:
> perl -MDateTime::Format::ICal -e
> "DateTime::Format::ICal->parse_recurrence(recurrence=>'FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T200000Z;COUNT=12')"
> The 'start' parameter ("20090201t200000z") to DateTime::Span::from_datetimes
> was a 'scalar', which is not one of the allowed types: object
>  at C:/strawberry/perl/site/lib/DateTime/Span.pm line 37
>    DateTime::Span::from_datetimes(undef, 'start', '20090201t200000z')
> called at C:/strawberry/perl/site/lib/DateTime/Event/ICal.pm line 515
>    DateTime::Event::ICal::recur('DateTime::Event::ICal', 'freq', 'monthly',
> 'byday', 'ARRAY(0x11f805c)', 'dtstart', '20090201t200000z') called at
> C:/strawberry/perl/site/lib/DateTime/Event/ICal.pm line 501
>    DateTime::Event::ICal::recur('DateTime::Event::ICal', 'count', 12,
> 'freq', 'monthly', 'byday', 'ARRAY(0x11f805c)', 'dtstart',
> '20090201t200000z', ...) called at
> C:/strawberry/perl/site/lib/DateTime/Format/ICal.pm line 173
>    DateTime::Format::ICal::parse_recurrence(undef, 'recurrence',
> 'FREQ=MONTHLY;BYDAY=2WE;DTSTART=20090201T200000Z;COUNT=12', 'dtstart',
> 'DateTime=HASH(0x11f772c)') called at C:/Documents and
> Settings/omengue/Documents/Eclipse/Test POE Scheduler/test-ical-recur.pl
> line 31
>
>
> It looks like a conversion of the string value of dtstart to a DateTime
> object is missing...
>
> Olivier
> http://o.mengue.free.fr/
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.