Email::Date::Format(3pm)

Email::Date::Format3pm

Produce rfc 2822 date strings

Usage

  use Email::Date::Format qw(email_date);
  my $header = email_date($date->epoch);
  Email::Simple->create(
    header => [
      Date => $header,
    ],
    body => '...',
  );

Version

version 1.008

Overview

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.)

Perl version

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.

Functions

email_date

  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" is exported only if requested.

email_gmdate

  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" is exported only if requested.

Contributors

•

[email protected] <[email protected]>

•

Eric Sproul <[email protected]>

•

Ricardo Signes <[email protected]>

Releases

10 releases since Debian 5.0 (Lenny); the text changed 4 times.

  1. 5.0–7
  2. 8–10
  3. 11
  4. 12–13
  5. Arch

Authors

•

Casey West

•

Ricardo SIGNES <[email protected]>

From perl-email-date-format 1.008-6 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.