HTTP::Headers::ActionPack::DateHeader - A Date Header
# 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(
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
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.
- 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
- These delegate to the underlying Time::Piece object.
Stevan Little <email@example.com>
- Andrew Nelson <firstname.lastname@example.org>
- Dave Rolsky <email@example.com>
- Florian Ragwitz <firstname.lastname@example.org>
- Jesse Luehrs <email@example.com>
- Karen Etheridge <firstname.lastname@example.org>
COPYRIGHT AND LICENSE¶
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it
under the same terms as the Perl 5 programming language system itself.