Index: lib/Email/Date/README.mtt =================================================================== --- lib/Email/Date/README.mtt (revision 0) +++ lib/Email/Date/README.mtt (revision 0) @@ -0,0 +1,4 @@ +All the files in this directory are the Email::Date::Format distribution +from search.cpan.org: + + http://search.cpan.org/~rjbs/Email-Date-Format-1.002/lib/Email/Date/Format.pm Index: lib/Email/Date/Format.pm =================================================================== --- lib/Email/Date/Format.pm (revision 0) +++ lib/Email/Date/Format.pm (revision 0) @@ -0,0 +1,128 @@ +use 5.006; +use strict; +use warnings; + +package Email::Date::Format; + +our $VERSION = '1.002'; +our @EXPORT_OK = qw[email_date email_gmdate]; + +use Exporter; +BEGIN { our @ISA = 'Exporter' } +use Time::Local (); + +=head1 NAME + +Email::Date::Format - produce RFC 2822 date strings + +=head1 SYNOPSIS + + use Email::Date::Format qw(email_date); + + my $header = email_date($date->epoch); + + Email::Simple->create( + header => [ + Date => $header, + ], + body => '...', + ); + +=head1 DESCRIPTION + +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.) + +=head2 FUNCTIONS + +=over 4 + +=item email_date + + my $date = email_date; # now + my $date = email_date( time - 60*60 ); # one hour ago + +C accepts an epoch value, such as the one returned by C