> Both examples work here - maybe you need to update DateTime.pm?
> - Flavio S. Glock

I upgraded everything from cpan, and I'm closer.
Could you try again without the "dtend" and "until" args?
Combining with bysetpos and dtstart being set still gives me problems.

[btw, is there some easy way to get cpan to upgrade 
everything under some package like DateTime::* ?
i had to write a small perl program just to upgrade
my perl, which seems like the kind of thing a perl-hater
would use as evidence against us...]

btw, the RRULE processing seems rather inefficient.
For example, to process:

   RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=TH;BYSETPOS=1;UNTIL=20061229

I counted over 1000 calls to DateTime::_compare_overload
I tried delving into the recurrence source code, but had to
retreat in order to preserve my sanity :(.  To much recursion,
anonymous subs, and random inline constants like "10"....

-mda

On Fri, 23 Sep 2005 00:32:18 -0700, "Mark D. Anderson"
<[EMAIL PROTECTED]> said:
> Using DateTime::Event::ICal $VERSION = 0.08;
> 
> this test case causes a lot of warnings (and eventual death,
> if called from DateTime::Format::ICal).
> 
> it happens when both bysetpos and dtstart are set.
> 
> I ran into this using an ics file "in the wild";
> this isn't some artifical case.
> 
> -mda
> 
> 
> use DateTime::Event::ICal;
> use DateTime;
> 
>     DateTime::Event::ICal->recur(
>                                    freq => 'monthly',
>                                    interval => '09',
>                                    byday => ['th'],
>                                    bysetpos => [1],
>                                    bymonthday => [15],
>                                    count => '2',
>                                    dtstart => DateTime->now(),
>                                  dtend => DateTime->new(year => '2007'),
>                                  until => DateTime->new(year => '2007'),
>                                    );
> 
> or alternatively:
> 
>     DateTime::Format::ICal->parse_recurrence(
>                                              recurrence =>
>                                              
> 'FREQ=MONTHLY;INTERVAL=09;BYDAY=TH;BYSETPOS=1;BYMONTHDAY=15;COUNT=2',
>                                    dtstart => DateTime->now(),
>                                  dtend => DateTime->new(year => '2007'),
>                                  until => DateTime->new(year => '2007'),
>                                              ) 
> 
> 
> ---
> Use of uninitialized value in sort at
> /usr/local/lib/perl5/site_perl/5.8.4/DateTime/Event/ICal.pm line 469.
> Use of uninitialized value in negation (-) at
> /usr/local/lib/perl5/site_perl/5.8.4/i686-linux/DateTime.pm line 1246.
> Use of uninitialized value in sort at
> /usr/local/lib/perl5/site_perl/5.8.4/DateTime/Event/ICal.pm line 469.
> Use of uninitialized value in negation (-) at
> /usr/local/lib/perl5/site_perl/5.8.4/i686-linux/DateTime.pm line 1246.
> ...
> 
> Parameter #1 ("0") to DateTime::add_duration was not a
> 'DateTime::Duration' (it is a 0)
>  at /usr/local/lib/perl5/site_perl/5.8.4/Set/Infinite/_recurrence.pm
>  line 157

Reply via email to