NAME

Curse::Date - HTTP Dates

SYNOPSIS

use Curse::Date;

my $date = Curse::Date->new(784111777);
my $http_date = $date->as_string;
$date->parse('Sun, 06 Nov 1994 08:49:37 GMT');
my $epoch = $date->epoch;

DESCRIPTION

Curse::Date implements HTTP date and time functions according to RFC2616.

Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format

ATTRIBUTES

epoch

my $epoch = $date->epoch;
$date     = $date->epoch(time);

METHODS

Curse::Date inherits all methods from Nevermore and implements the following new ones.

new

my $date = Curse::Date->new($string);

as_string

my $http_date = $date->as_string;

parse

$date = $date->parse('Sun Nov  6 08:49:37 1994');