.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTTP::Headers::ActionPack::DateHeader 3pm" .TH HTTP::Headers::ActionPack::DateHeader 3pm "2013-06-18" "perl v5.22.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTTP::Headers::ActionPack::DateHeader \- A Date Header .SH "VERSION" .IX Header "VERSION" version 0.09 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use HTTP::Headers::ActionPack::DateHeader; \& \& # create from string \& my $date = HTTP::Headers::ActionPack::DateHeader\->new_from_string( \& \*(AqMon, 23 Apr 2012 14:14:19 GMT\*(Aq \& ); \& \& # create using Time::Peice object \& my $date = HTTP::Headers::ActionPack::DateHeader\->new( \& $timepeice_object \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is an object which represents an \s-1HTTP\s0 header with a date. It will inflate the header value into a Time::Piece object and proxy most of the relevant methods. .SH "DateTime compatibility" .IX Header "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 \&\f(CW\*(C`new\*(C'\fR and after that everything should behave properly. If you want \f(CW\*(C`new_from_string\*(C'\fR to inflate strings to DateTime objects you will need to override that method yourself. .SH "METHODS" .IX Header "METHODS" .ie n .IP """date""" 4 .el .IP "\f(CWdate\fR" 4 .IX Item "date" Returns the underlying Time::Piece object. .ie n .IP """new_from_string ( $date_header_string )""" 4 .el .IP "\f(CWnew_from_string ( $date_header_string )\fR" 4 .IX Item "new_from_string ( $date_header_string )" This will take an \s-1HTTP\s0 header Date string and parse it into and object. .ie n .IP """as_string""" 4 .el .IP "\f(CWas_string\fR" 4 .IX Item "as_string" .PD 0 .ie n .IP """second""" 4 .el .IP "\f(CWsecond\fR" 4 .IX Item "second" .ie n .IP """minute""" 4 .el .IP "\f(CWminute\fR" 4 .IX Item "minute" .ie n .IP """hour""" 4 .el .IP "\f(CWhour\fR" 4 .IX Item "hour" .ie n .IP """day_of_month""" 4 .el .IP "\f(CWday_of_month\fR" 4 .IX Item "day_of_month" .ie n .IP """month_number""" 4 .el .IP "\f(CWmonth_number\fR" 4 .IX Item "month_number" .ie n .IP """fullmonth""" 4 .el .IP "\f(CWfullmonth\fR" 4 .IX Item "fullmonth" .ie n .IP """month""" 4 .el .IP "\f(CWmonth\fR" 4 .IX Item "month" .ie n .IP """year""" 4 .el .IP "\f(CWyear\fR" 4 .IX Item "year" .ie n .IP """day_of_week""" 4 .el .IP "\f(CWday_of_week\fR" 4 .IX Item "day_of_week" .ie n .IP """day""" 4 .el .IP "\f(CWday\fR" 4 .IX Item "day" .ie n .IP """fullday""" 4 .el .IP "\f(CWfullday\fR" 4 .IX Item "fullday" .ie n .IP """epoch""" 4 .el .IP "\f(CWepoch\fR" 4 .IX Item "epoch" .PD These delegate to the underlying Time::Piece object. .SH "AUTHOR" .IX Header "AUTHOR" Stevan Little .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" .IP "\(bu" 4 Andrew Nelson .IP "\(bu" 4 Dave Rolsky .IP "\(bu" 4 Florian Ragwitz .IP "\(bu" 4 Jesse Luehrs .IP "\(bu" 4 Karen Etheridge .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2012 by Infinity Interactive, Inc.. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.