Just something I threw together:

use DateTime::Format::ICal;
use DateTime::Event::ICal;

my $dt = DateTime->now;
my $span = DateTime::Event::ICal->recur( freq => 'daily', until => $dt );

DateTime::Format::ICal->format_recurrence( $span );
# prints: RRULE:FREQ=DAILY;UNTIL=2009-11-16T20:24:02

On Mon, Nov 16, 2009 at 4:16 PM, Flavio S. Glock <fgl...@gmail.com> wrote:

> Would you have a small test script that shows the problem?
>
> I suspect it can be a problem in DateTime::Event::ICal->_param_str(),
> which is used to stringify the parameters when a recurrence is
> created. It uses the datetime() method, which outputs in ISO format.
>
> thanks
> Flávio S. Glock
>
> 2009/11/16 Nick Spacek <nick.spa...@gmail.com>:
> > Hi folks,
> >
> > I was trying to use format_recurrence from DateTime::Format::ICal today
> with
> > a parameter specified to until when I discovered that the resulting
> string
> > does not correctly format the date. It seems to come out in ISO format
> (that
> > is, %Y-%m-%dT%h:%m:%s, I think) instead of ICal format.
> >
> > The string cannot be parsed (obviously I guess) by DateTime::Format::ICal
> > either.
> >
> > The recurrence tests for DateTime::Format::ICal do not check the
> > format_recurrence method when using the 'until' parameter, though they do
> > check that parsing recurrences that have UNTIL work.
> >
> > Thanks.
> > Nick Spacek
> >
>

Reply via email to