dreamy has asked for the wisdom of the Perl Monks concerning the following question:

I'm just trying to get right with the Ical format.
On CPAN there are only two modules available.

While Date::Ical seems to be quite new,
and useful to convert the date-format

Net::ICal was not touched since August 3, 2001

My basic investigation in this topic lead me
to the Reefknot Project Page at
http://sourceforge.net/projects/reefknot/
where the development seem to be stagged
at the same time/point.

My Question is now:
Is there anyone handling ICal
who can give me some examples.

Another Question is:
Does anyone know if the reefknot group
will continue Net::ICal in future ?
What ist the project status ?

Replies are listed 'Best First'.
Re: Parsing ICal Format
by jasonk (Parson) on Feb 18, 2003 at 17:27 UTC

    I've always just used Net::ICal, I'd imagine the development of the module has slowed probably because it's a fairly simple protocol that hasn't changed since the RFC was adopted in 1998.

Re: Parsing ICal Format
by BigLug (Chaplain) on Feb 19, 2003 at 00:59 UTC
    I'd suggest looking at the DateTime effort. DateTime is an effort to create a 'difinitive' date and time parsing and formatting system. It is in very active development (kind of still in developer status, however I'd say its stable enough to start using). You'll need DateTime, DateTime::Timezone and DateTime::Format::iCal.

    To use it all to work with your iCal dates, here's a Synopsis:

    use DateTime; use DateTime::Format::ICal; # Convert 'parts' into an iCal: my $DateTimeObject1 = DateTime->new( year=>2003, month=>2, day=>19, hour=>16, minute=>23, second=>22 ); print DateTime::Format::ICal->format_datetime( $DateTimeObject1); #20030219T162322Z # Convert an iCal into parts: my $DateTimeObject2 = DateTime::Format::ICal->parse_datetime('20030219 +T162322Z'); print $DateTimeObject2->year; #2003 print $DateTimeObject2->month; #2 #etc...
    Check the DateTime documentation for the piles of other things the DateTime module can do for you. It overrides operators like + and -. If you print the object in scalar format, it will return a string: print "$DateTimeObject2";