use 5.006; use strict; use warnings; package Email::Date::Format; # ABSTRACT: produce RFC 2822 date strings $Email::Date::Format::VERSION = '1.005'; our @EXPORT_OK = qw[email_date email_gmdate]; use Exporter 5.57 'import'; use Time::Local (); #pod =head1 SYNOPSIS #pod #pod use Email::Date::Format qw(email_date); #pod #pod my $header = email_date($date->epoch); #pod #pod Email::Simple->create( #pod header => [ #pod Date => $header, #pod ], #pod body => '...', #pod ); #pod #pod =head1 DESCRIPTION #pod #pod This module provides a simple means for generating an RFC 2822 compliant #pod datetime string. (In case you care, they're not RFC 822 dates, because they #pod use a four digit year, which is not allowed in RFC 822.) #pod #pod =func email_date #pod #pod my $date = email_date; # now #pod my $date = email_date( time - 60*60 ); # one hour ago #pod #pod C accepts an epoch value, such as the one returned by C