Email::Date::Format - produce RFC 2822 date strings
version 1.008
use Email::Date::Format qw(email_date); my $header = email_date($date->epoch); Email::Simple->create( header => [ Date => $header, ], body => '...', );
This module provides a simple means for generating an RFC 2822 compliant datetime string. (In case you care, they're not RFC 822 dates, because they use a four digit year, which is not allowed in RFC 822.)
This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.
my $date = email_date; # now my $date = email_date( time - 60*60 ); # one hour ago
email_date accepts an epoch value, such as the one returned by time. It returns a string representing the date and time of the input, as specified in RFC 2822. If no input value is provided, the current value of time is used.
email_date
time
email_date is exported only if requested.
my $date = email_gmdate;
email_gmdate is identical to email_date, but it will return a string indicating the time in Greenwich Mean Time, rather than local time.
email_gmdate
email_gmdate is exported only if requested.
Casey West
Ricardo SIGNES <cpan@semiotic.systems>
bitcardbmw@lsmod.de <bitcardbmw@lsmod.de>
Eric Sproul <esproul@omniti.com>
Ricardo Signes <rjbs@semiotic.systems>
This software is copyright (c) 2004 by Casey West.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Email::Date::Format, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Date::Format
CPAN shell
perl -MCPAN -e shell install Email::Date::Format
For more information on module installation, please visit the detailed CPAN module installation guide.