HTTP::...eHeader(3pm)
π HTTP::Headers::ActionPack::DateHeader(3pm) π
okay bestie, welcome to the manpage for HTTP::Headers::ActionPack::DateHeader β yes it's a mouthful, yes it's iconic, and yes it is literally just a Date Header. That's the whole job. She's a header that holds a date. Let's get into it ποΈβ¨
β¨ VERSION β¨
version 0.09 β she's serving vintage, she's been here a minute π
πΈ SYNOPSIS πΈ
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
);
two ways to make her, bestie. one from a string, one from a Time::Peice object. pick your fighter π«Ά
π¦ DESCRIPTION π¦
So. This is an object which represents an HTTP header with a date. That's it, that's the gig π
What she does though? She will inflate the header value into a Time::Piece object and proxy most of the relevant methods. So you hand her a string, she hands you back a whole real time object with methods and everything. it's giving glow-up, it's giving transformation arc, we love to see it π
π DateTime compatibility
Okay so this is the part where the author explains their choices and honestly? valid.
They 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. fair. respectful. we understand.
That said β and this is important β 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. β¨
And if you want new_from_string to inflate strings to DateTime objects, you will need to override that method yourself. no hand-holding here, you're on your own for that one bestie π DIY era
π METHODS π
dateβ Returns the underlyingTime::Pieceobject. that's your girl right there, the real one underneath πΈnew_from_string ( $date_header_string )β This will take an HTTP header Date string and parse it into and object. (yes, "and object", we're quoting the author, the vibes are immaculate and the grammar is free ποΈ)as_stringsecondminutehourday_of_monthmonth_numberfullmonthmonthyearday_of_weekdayfulldayepoch
These delegate to the underlying Time::Piece object. π«Ά so like, every single one of them is just passing the message along to the Time::Piece underneath. she's a middlewoman and she's great at it. no cap.
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com>
π CONTRIBUTORS π
- Andrew Nelson
<anelson@cpan.org> - Dave Rolsky
<autarch@urth.org> - Florian Ragwitz
<rafl@debian.org> - Jesse Luehrs
<doy@tozt.net> - Karen Etheridge
<ether@cpan.org>
the whole squad showed up, we love a collaborative effort, main character energy from every single one of them β
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Infinity Interactive, Inc.. (two periods, we're keeping it, that's canon π)
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, open source, we stan π«Ά
okay and that's the whole page bestie!! this one came from the User Contributed Perl Documentation and she's living on perl v5.34.0, dated 2022-06-14 β so if you're reading this, that's the vintage you're sipping from πβ¨ go forth and format your dates, ily, bye!! πππ
π¦ where this page comes from
- debian bookworm: libhttp-headers-actionpack-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhttp-headers-actionpack-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms