HTTP::Headers::ActionPack::DateHeader(3pm)

HTTP::Headers::ActionPack::DateHeader3pm

A date header

Usage

  use HTTP::Headers::ActionPack::DateHeader;
  # create from string
  my $date = HTTP::Headers::ActionPack::DateHeader->new_from_string(
      'Mon, 23 Apr 2012 14:14:19 GMT'
  );
  # create using Time::Peice object
  my $date = HTTP::Headers::ActionPack::DateHeader->new(
      $timepeice_object
  );

Version

version 0.09

Overview

This is an object which represents an HTTP header with a date. It will inflate the header value into a Time::Piece object and proxy most of the relevant methods.

DateTime compatibility

I opted to not use DateTime (by default) for this class since it is not a core module and can be a memory hog at times. That said, it should be noted that DateTime objects are compatible with this class. You will need to pass in a DateTime instance to "new" and after that everything should behave properly. If you want "new_from_string" to inflate strings to DateTime objects you will need to override that method yourself.

Methods

"date"

Returns the underlying Time::Piece object.

"new_from_string ( $date_header_string )"

This will take an HTTP header Date string and parse it into and object.

"as_string"
"second"
"minute"
"hour"
"day_of_month"
"month_number"
"fullmonth"
"month"
"year"
"day_of_week"
"day"
"fullday"
"epoch"

These delegate to the underlying Time::Piece object.

Contributors

•

Andrew Nelson <[email protected]>

•

Dave Rolsky <[email protected]>

•

Florian Ragwitz <[email protected]>

•

Jesse Luehrs <[email protected]>

•

Karen Etheridge <[email protected]>

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9–10
  2. 11
  3. 12
  4. 13

Author

Stevan Little <[email protected]>

From libhttp-headers-actionpack-perl 0.09-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.