NAME
XML::Loy::Date::RFC822 - Date strings according to RFC822
SYNOPSIS
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;
DESCRIPTION
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.
ATTRIBUTES
XML::Loy::Date::RFC822 implements the following attributes.
epoch
my $epoch = $date->epoch;
$date = $date->epoch(1317832113);
Epoch seconds.
METHODS
new
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.
parse
$date = $date->parse('Wed, 05 Oct 2011 09:28:33 PDT');
$date = $date->parse(1317832113);
Parses RFC822 compliant date strings. Also accepts epoch seconds.
to_string
my $string = $date->to_string;
Renders date suitable to RFC822 without offset information.
DEPENDENCIES
AVAILABILITY
https://github.com/Akron/XML-Loy
COPYRIGHT AND LICENSE
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.