Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Email::Date::Format

Name Email::Date::Format
Version 1.005
Located at /usr/local/share/perl5
File /usr/local/share/perl5/Email/Date/Format.pm
Is Core No
Search CPAN for this module Email::Date::Format
Documentation Email::Date::Format
Module Details Email::Date::Format


NAME

Email::Date::Format - produce RFC 2822 date strings


VERSION

version 1.005


SYNOPSIS

  use Email::Date::Format qw(email_date);

  my $header = email_date($date->epoch);

  Email::Simple->create(
    header => [
      Date => $header,
    ],
    body => '...',
  );


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


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.


AUTHORS


COPYRIGHT AND LICENSE

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.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024