.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" 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 >0, 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 "POSIX::strptime 3pm"
.TH POSIX::strptime 3pm "2019-10-18" "perl v5.30.0" "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"
POSIX::strptime \- Perl extension to the POSIX date parsing strptime(3) function
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\& ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = POSIX::strptime("string", "Format");
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Perl interface to \fBstrptime\fR\|(3)
.SH "FUNCTIONS"
.IX Header "FUNCTIONS"
.IP "strptime" 4
.IX Item "strptime"
.Vb 1
\& ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday) = POSIX::strptime(string, format);
.Ve
.Sp
The result for any value not extracted is not defined. Some platforms may
reliably return \f(CW\*(C`undef\*(C'\fR, but this is dependent on the \f(CWstrptime(3)\fR function
in the underlying C library.
.Sp
For example, only the following fields may be relied upon:
.Sp
.Vb 1
\& my ($min, $hour) = ( POSIX::strptime( "01:23", \*(Aq%H:%M\*(Aq ) )[1,2];
\& 
\& my ($mday, $mon, $year) = ( POSIX::strptime( "2010/07/16", \*(Aq%Y/%m/%d\*(Aq ) )[3,4,5];
.Ve
.Sp
Furthermore, not all platforms will set the \f(CW$wday\fR and \f(CW$yday\fR elements. If
these values are required, use \f(CW\*(C`mktime\*(C'\fR and \f(CW\*(C`gmtime\*(C'\fR:
.Sp
.Vb 2
\& use POSIX qw( mktime );
\& use POSIX::strptime qw( strptime );
\&
\& my ($mday, $mon, $year) = ( POSIX::strptime( "2010/07/16", \*(Aq%Y/%m/%d\*(Aq ) )[3,4,5];
\& my $wday = ( gmtime mktime 0, 0, 0, $mday, $mon, $year )[6];
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBstrptime\fR\|(3)
.SH "AUTHOR"
.IX Header "AUTHOR"
Philippe M. Chiasson <gozer@cpan.org>
Kim Scheibel <kim@scheibel.co.uk>
.SH "REPOSITORY"
.IX Header "REPOSITORY"
http://svn.ectoplasm.org/projects/perl/POSIX\-strptime/trunk/
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2005 by Philippe M. Chiasson <gozer@cpan.org>.
.PP
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
.PP
See \fIhttp://www.perl.com/perl/misc/Artistic.html\fR
