aboutsummaryrefslogtreecommitdiffstats
path: root/man3/strftime.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2005-11-22 18:41:24 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2005-11-22 18:41:24 +0000
commitee14b2e09f1fe5ff83aca21a4d2defef071d8f85 (patch)
treeaa4c548a83b647fdacf0e0affb507ed98e0cd567 /man3/strftime.3
parent8db74412a0c713a9b902f917f86202eec9c56308 (diff)
downloadman-pages-ee14b2e09f1fe5ff83aca21a4d2defef071d8f85.tar.gz
Added GLIBC NOTES section describing padding and width specifiers.
Diffstat (limited to 'man3/strftime.3')
-rw-r--r--man3/strftime.329
1 files changed, 28 insertions, 1 deletions
diff --git a/man3/strftime.3 b/man3/strftime.3
index fc6cc5d9d2..8160ab7ba8 100644
--- a/man3/strftime.3
+++ b/man3/strftime.3
@@ -228,7 +228,6 @@ E modifier is to use a locale-dependent alternative representation.
The broken-down time structure \fItm\fP is defined in \fI<time.h>\fP.
See also
.BR ctime (3).
-
.SH "RETURN VALUE"
The \fBstrftime\fP() function returns the number of characters placed
in the array \fIs\fP, not including the terminating NUL character,
@@ -259,6 +258,34 @@ In SUSv2, the %S specified allowed a range of 00 to 61,
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.)
+The following flag characters are permitted:
+.TP
+.B _
+(underscore)
+Pad a numeric output string with spaces.
+.TP
+.B \-
+(dash)
+Do not pad a numeric output string.
+.TP
+.B 0
+Pad a numeric output string with zeros even if the conversion character
+specifies space padding.
+.TP
+.B ^
+Convert alphabetic characters in output string to upper case.
+.TP
+.B #
+Swap the case of the output string (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.
.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" .