XML::Loy::Date::RFC822 - Date strings according to RFC822
use XML::Loy::Date::RFC822; my $date = XML::Loy::Date::RFC822->new(1317832113); my $date_str = $date->to_string; $date->parse('Wed, 05 Oct 2011 09:28:33 PDT'); my $epoch = $date->epoch;
XML::Loy::Date::RFC822 implements date and time functions according to RFC822. Other than Mojo::Date it supports different timezones.
This module is meant to be compatible with the Mojo::Date-API but has no Mojo dependencies.
This module is EXPERIMENTAL and may be changed, replaced or renamed without warnings.
XML::Loy::Date::RFC822 implements the following attributes.
my $epoch = $date->epoch; $date = $date->epoch(1317832113);
Epoch seconds.
my $date = XML::Loy::Date::RFC822->new; my $date = XML::Loy::Date::RFC822->new($string);
Constructs a new XML::Loy::Date::822 object. Accepts a date string to be parsed.
$date = $date->parse('Wed, 05 Oct 2011 09:28:33 PDT'); $date = $date->parse(1317832113);
Parses RFC822 compliant date strings. Also accepts epoch seconds.
my $string = $date->to_string;
Renders date suitable to RFC822 without offset information.
Time::Local.
https://github.com/Akron/XML-Loy
Copyright (C) 2011-2016, Nils Diewald.
The code is heavily based on Mojo::Date, written by Sebastian Riedel. See Mojo::Date for additional copyright and license information.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl.
To install XML::Loy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Loy
CPAN shell
perl -MCPAN -e shell install XML::Loy
For more information on module installation, please visit the detailed CPAN module installation guide.