GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Email::Date::Format(3) User Contributed Perl Documentation Email::Date::Format(3)

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

version 1.005

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

  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.

  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.

  • Casey West
  • Ricardo SIGNES <rjbs@cpan.org>

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.

2014-10-13 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.