DateTime::Format::Atom - Parse and format Atom datetime strings
Version 1.6.0
use DateTime::Format::Atom; my $format = DateTime::Format::Atom->new(); my $dt = $format->parse_datetime( '2002-07-01T13:50:05Z' ); # 2002-07-01T13:50:05Z print $format->format_datetime( $dt );
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.
my $format = DateTime::Format::Atom->new();
my $dt = DateTime::Format::Atom->parse_datetime( $string ); my $dt = $format->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.
my $string = DateTime::Format::Atom->format_datetime( $dt ); my $string = $format->format_datetime( $dt );
Given a DateTime object, this methods returns a Atom datetime string.
DateTime
DateTime::Format::RFC3339
DateTime::Format::ISO8601
http://tools.ietf.org/html/rfc3339, "Date and Time on the Internet: Timestamps"
http://tools.ietf.org/html/rfc4287, "The Atom Syndication Format"
You can find documentation for this module with the perldoc command.
perldoc DateTime::Format::Atom
You can also find it online at this location:
https://metacpan.org/dist/Datetime-Format-Atom
If you need help, the following are great resources:
https://stackoverflow.com/|StackOverflow
http://www.perlmonks.org/|PerlMonks
You may also contact the author directly.
Please report any bugs or feature requests using https://github.com/ikegami/perl-Datetime-Format-Atom/issues. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Web: https://github.com/ikegami/perl-Datetime-Format-Atom
git: https://github.com/ikegami/perl-Datetime-Format-Atom.git
Eric Brine, <ikegami@adaelis.com>
<ikegami@adaelis.com>
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.
To install DateTime::Format::Atom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DateTime::Format::Atom
CPAN shell
perl -MCPAN -e shell install DateTime::Format::Atom
For more information on module installation, please visit the detailed CPAN module installation guide.