mirror of https://github.com/mkerrisk/man-pages
Wording improvements for 'flag' and 'width' descriptions.
Some wording changes to bring terminology closer to SUSv3.
This commit is contained in:
parent
ee14b2e09f
commit
a4020d9ca4
|
@ -29,8 +29,10 @@
|
|||
.\" Applied fix by Wolfgang Franke, aeb, 961011
|
||||
.\" Corrected return value, aeb, 970307
|
||||
.\" Added Single Unix Spec conversions and %z, aeb/esr, 990329.
|
||||
.\" 2005-11-22 mtk, added GLIBC NOTES covering optional 'flag' and
|
||||
.\" 'width' components of conversion specifications.
|
||||
.\"
|
||||
.TH STRFTIME 3 1999-03-29 "GNU" "Linux Programmer's Manual"
|
||||
.TH STRFTIME 3 2005-11-23 "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
strftime \- format date and time
|
||||
.SH SYNOPSIS
|
||||
|
@ -46,8 +48,12 @@ according to the format specification \fIformat\fP and places the
|
|||
result in the character array \fIs\fP of size \fImax\fP.
|
||||
.PP
|
||||
Ordinary characters placed in the format string are copied to \fIs\fP
|
||||
without conversion. Conversion specifiers are introduced by a `%'
|
||||
character, and are replaced in \fIs\fP as follows:
|
||||
without conversion.
|
||||
.I "Conversion specifications"
|
||||
are introduced by a `%'
|
||||
character, and terminated by a
|
||||
.IR "conversion specifier character" ,
|
||||
and are replaced in \fIs\fP as follows:
|
||||
.TP
|
||||
.B %a
|
||||
The abbreviated weekday name according to the current locale.
|
||||
|
@ -213,9 +219,10 @@ format. (TZ)
|
|||
.B %%
|
||||
A literal `%' character.
|
||||
.PP
|
||||
Some conversion specifiers can be modified by preceding them
|
||||
by the E or O modifier to indicate that an alternative format
|
||||
should be used.
|
||||
Some conversion specifications can be modified by preceding the
|
||||
conversion specifier character by the E or O
|
||||
.I modifier
|
||||
to indicate that an alternative format should be used.
|
||||
If the alternative format or specification does not exist for
|
||||
the current locale, the behaviour will be as if the unmodified
|
||||
conversion specification were used. (SU)
|
||||
|
@ -259,33 +266,43 @@ to allow for the theoretical possibility of a minute that
|
|||
included a double leap second
|
||||
(there never has been such a minute).
|
||||
.SH GLIBC NOTES
|
||||
Glibc provides a number of extensions for conversion specifiers.
|
||||
Between the % character and the conversion character,
|
||||
an optional flag and field width may be specified.
|
||||
(These precede the E or O modifies, if present.)
|
||||
Glibc provides some extensions for conversion specifications.
|
||||
(These extensions are not specified in POSIX.1-2001, but a few other
|
||||
systems provide similar features.)
|
||||
.\" HP-UX and Tru64 also have features like this.
|
||||
Between the % character and the conversion specifier character,
|
||||
an optional
|
||||
.I flag
|
||||
and field
|
||||
.I width
|
||||
may be specified.
|
||||
(These precede the E or O modifiers, if present.)
|
||||
|
||||
The following flag characters are permitted:
|
||||
.TP
|
||||
.B _
|
||||
(underscore)
|
||||
Pad a numeric output string with spaces.
|
||||
Pad a numeric result string with spaces.
|
||||
.TP
|
||||
.B \-
|
||||
(dash)
|
||||
Do not pad a numeric output string.
|
||||
Do not pad a numeric result string.
|
||||
.TP
|
||||
.B 0
|
||||
Pad a numeric output string with zeros even if the conversion character
|
||||
specifies space padding.
|
||||
Pad a numeric result string with zeros even if the conversion
|
||||
specifier character uses space-padding by default.
|
||||
.TP
|
||||
.B ^
|
||||
Convert alphabetic characters in output string to upper case.
|
||||
Convert alphabetic characters in result string to upper case.
|
||||
.TP
|
||||
.B #
|
||||
Swap the case of the output string (only really useful with %Z).
|
||||
Swap the case of the result string.
|
||||
(This flag only works with certain conversion specifier characters,
|
||||
and of these, it is only really useful with %Z).
|
||||
.PP
|
||||
An optional decimal width specifier may follow the (possibly absent) flag.
|
||||
If the natural size of the field is smaller than this width,
|
||||
then the output string padded (on the left) to the specified width.
|
||||
then the result string is padded (on the left) to the specified width.
|
||||
.SH BUGS
|
||||
Some buggy versions of gcc complain about the use of %c:
|
||||
.IR "warning: `%c' yields only last 2 digits of year in some locales" .
|
||||
|
|
Loading…
Reference in New Issue