NAME

DateTime::Format::ICal - Parse and format iCal datetime and duration strings

SYNOPSIS

use DateTime::Format::ICal;

my $ical = DateTime::Format::ICal->new;

my $dt = $ical->parse_datetime( '20030117T032900Z' );

my $dur = $ical->parse_duration( '+P3WT4H55S' );

# 20030117T032900Z
$ical->format_datetime($dt);

# +P3WT4H55S
$ical->format_duration($dur);

DESCRIPTION

This module understands the ICal date/time and duration formats, as defined in RFC 2445. It can be used to parse these formats in order to create the appropriate objects.

METHODS

This API is currently experimental and may change in the future.

  • parse_datetime($string)

    Given an iCal datetime string, this method will return a new DateTime object.

    If given an improperly formatted string, this method may die.

  • parse_duration($string)

    Given an iCal duration string, this method will return a new DateTime::Duration object.

    If given an improperly formatted string, this method may die.

  • format_datetime($datetime)

    Given a DateTime object, this methods returns an iCal datetime string.

  • format_duration($duration)

    Given a DateTime::Duration object, this methods returns an iCal duration string.

    The iCal standard does not allow for months or years in duration, so if a duration for which delta_months() return true is given, then this method will die.

SUPPORT

Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details.

AUTHOR

Dave Rolsky <autarch@urth.org>

Some of the code int his module comes from Rich Bowen's Date::ICal module.

COPYRIGHT

Copyright (c) 2003 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Portions of the code in this distribution are derived from other works. Please see the CREDITS file for more details.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

datetime@perl.org mailing list

http://datetime.perl.org/

1 POD Error

The following errors were encountered while parsing the POD:

Around line 234:

You forgot a '=back' before '=head1'