strptime.3: Some rewording and reorganization

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2013-12-30 19:35:26 +13:00
parent 652d08e1fd
commit 77f48c37e0
1 changed files with 35 additions and 33 deletions

View File

@ -28,7 +28,7 @@
.\" Modified, aeb, 2001-08-31
.\" Modified, wharms 2001-11-12, remark on white space and example
.\"
.TH STRPTIME 3 2009-12-05 "GNU" "Linux Programmer's Manual"
.TH STRPTIME 3 2013-12-30 "GNU" "Linux Programmer's Manual"
.SH NAME
strptime \- convert a string representation of time to a time tm structure
.SH SYNOPSIS
@ -41,18 +41,47 @@ strptime \- convert a string representation of time to a time tm structure
.SH DESCRIPTION
The
.BR strptime ()
function is the converse function to
.BR strftime (3)
and converts the character string pointed to by
function is the converse of
.BR strftime (3);
it converts the character string pointed to by
.I s
to values which are stored in the
.I tm
"broken-down time"
structure pointed to by
.IR tm ,
using the format specified by
.IR format .
Here
The broken-down time structure
.I tm
is defined in
.IR <time.h>
as follows:
.sp
.in +4n
.nf
struct tm {
int tm_sec; /* Seconds (0-60) */
int tm_min; /* Minutes (0-59) */
int tm_hour; /* Hours (0-23) */
int tm_mday; /* Day of the month (1-31) */
int tm_mon; /* Month (0-11) */
int tm_year; /* Year - 1900 */
int tm_wday; /* Day of the week (0-6, Sunday = 0) */
int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */
int tm_isdst; /* Daylight saving time */
};
.fi
.in
For more details on the
.I tm
structure, see
.BR ctime (3).
The
.I format
argument
is a character string that consists of field descriptors and text characters,
reminiscent of
.BR scanf (3).
@ -256,33 +285,6 @@ using the locale's alternative numeric symbols.
The year (offset from
.BR %C )
using the locale's alternative numeric symbols.
.LP
The broken-down time structure
.I tm
is defined in
.IR <time.h>
as follows:
.sp
.in +4n
.nf
struct tm {
int tm_sec; /* Seconds (0-60) */
int tm_min; /* Minutes (0-59) */
int tm_hour; /* Hours (0-23) */
int tm_mday; /* Day of the month (1-31) */
int tm_mon; /* Month (0-11) */
int tm_year; /* Year - 1900 */
int tm_wday; /* Day of the week (0-6, Sunday = 0) */
int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */
int tm_isdst; /* Daylight saving time */
};
.fi
.in
For more details on the
.I tm
structure, see
.BR ctime (3).
.SH RETURN VALUE
The return value of the function is a pointer to the first character
not processed in this function call.