The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DateTime::Format::Atom - Parse and format Atom datetime strings

VERSION

Version 1.2.0

SYNOPSIS

    use DateTime::Format::Atom;

    my $f = DateTime::Format::Atom->new();
    my $dt = $f->parse_datetime( '2002-07-01T13:50:05Z' );

    # 2002-07-01T13:50:05Z
    print $f->format_datetime($dt);

DESCRIPTION

This module understands the Atom date/time format, an ISO 8601 profile, defined at http://tools.ietf.org/html/rfc4287

It can be used to parse these formats in order to create the appropriate objects.

All the work is actually done by DateTime::Format::RFC3339.

METHODS

parse_datetime($string)

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

If given an improperly formatted string, this method will croak.

For a more flexible parser, see DateTime::Format::ISO8601.

format_datetime($datetime)

Given a DateTime object, this methods returns a Atom datetime string.

For simplicity, the datetime will be converted to UTC first.

SEE ALSO

BUGS

Please report any bugs or feature requests to bug-Datetime-Format-Atom at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DateTime-Format-Atom. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc DateTime::Format::Atom

You can also look for information at:

AUTHOR

Eric Brine, <ikegami@adaelis.com>

COPYRIGHT & LICENSE

No rights reserved.

The author has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.

Works under CC0 do not require attribution. When citing the work, you should not imply endorsement by the author.