summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man3/strftime.3
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/debian-unstable/man3/strftime.3')
-rw-r--r--upstream/debian-unstable/man3/strftime.357
1 files changed, 28 insertions, 29 deletions
diff --git a/upstream/debian-unstable/man3/strftime.3 b/upstream/debian-unstable/man3/strftime.3
index 412ba064..21c3f30a 100644
--- a/upstream/debian-unstable/man3/strftime.3
+++ b/upstream/debian-unstable/man3/strftime.3
@@ -15,7 +15,7 @@
.\" 2005-11-22 mtk, added glibc Notes covering optional 'flag' and
.\" 'width' components of conversion specifications.
.\"
-.TH strftime 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH strftime 3 2024-05-02 "Linux man-pages 6.8"
.SH NAME
strftime \- format date and time
.SH LIBRARY
@@ -24,11 +24,11 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <time.h>
-.PP
+.P
.BI "size_t strftime(char " s "[restrict ." max "], size_t " max ,
.BI " const char *restrict " format ,
.BI " const struct tm *restrict " tm );
-.PP
+.P
.BI "size_t strftime_l(char " s "[restrict ." max "], size_t " max ,
.BI " const char *restrict " format ,
.BI " const struct tm *restrict " tm ,
@@ -54,7 +54,7 @@ See also
.BR ctime (3).
.\" FIXME . POSIX says: Local timezone information is used as though
.\" strftime() called tzset(). But this doesn't appear to be the case
-.PP
+.P
The format specification is a null-terminated string and may contain
special character sequences called
.IR "conversion specifications",
@@ -63,7 +63,7 @@ some other character known as a
.IR "conversion specifier character".
All other character sequences are
.IR "ordinary character sequences".
-.PP
+.P
The characters of ordinary character sequences (including the null byte)
are copied verbatim from
.I format
@@ -168,10 +168,10 @@ Modifier: use alternative ("era-based") format, see below. (SU)
.B %F
Equivalent to
.B %Y\-%m\-%d
-(the ISO\ 8601 date format). (C99)
+(the ISO\~8601 date format). (C99)
.TP
.B %G
-The ISO\ 8601 week-based year (see NOTES) with century as a decimal number.
+The ISO\~8601 week-based year (see NOTES) with century as a decimal number.
The 4-digit year corresponding to the ISO week number (see
.BR %V ).
This has the same format and value as
@@ -330,7 +330,7 @@ and
.IR tm_wday .)
.TP
.B %V
-The ISO\ 8601 week number (see NOTES) of the current year as a decimal number,
+The ISO\~8601 week number (see NOTES) of the current year as a decimal number,
range 01 to 53, where week 1 is the first week that has at least
4 days in the new year.
See also
@@ -431,7 +431,7 @@ format. (TZ)
.TP
.B %%
A literal \[aq]%\[aq] character.
-.PP
+.P
Some conversion specifications can be modified by preceding the
conversion specifier character by the
.B E
@@ -477,7 +477,7 @@ as an argument to a
One example of such alternative forms is the Japanese era calendar scheme in the
.B ja_JP
glibc locale.
-.PP
+.P
.BR strftime_l ()
is equivalent to
.BR strftime (),
@@ -508,7 +508,7 @@ returns 0, and the contents of the array are undefined.
.\" would return
.\" .I max
.\" if the array was too small.)
-.PP
+.P
Note that the return value 0 does not necessarily indicate an error.
For example, in many locales
.B %p
@@ -537,7 +537,6 @@ T{
.BR strftime_l ()
T} Thread safety MT-Safe env locale
.TE
-.sp 1
.SH STANDARDS
.TP
.BR strftime ()
@@ -555,7 +554,7 @@ SVr4, C89.
.TP
.BR strftime_l ()
POSIX.1-2008.
-.PP
+.P
There are strict inclusions between the set of conversions
given in ANSI C (unmarked), those given in the Single UNIX Specification
(marked SU), those given in Olson's timezone package (marked TZ),
@@ -571,7 +570,7 @@ as well.
The
.B %F
conversion is in C99 and POSIX.1-2001.
-.PP
+.P
In SUSv2, the
.B %S
specifier allowed a range of 00 to 61,
@@ -579,13 +578,13 @@ to allow for the theoretical possibility of a minute that
included a double leap second
(there never has been such a minute).
.SH NOTES
-.SS ISO 8601 week dates
+.SS ISO\~8601 week dates
.BR %G ,
.BR %g ,
and
.B %V
yield values calculated from the week-based year defined by the
-ISO\ 8601 standard.
+ISO\~8601 standard.
In this system, weeks start on a Monday, and are numbered from 01,
for the first week, up to 52 or 53, for the last week.
Week 1 is the first week where four or more days fall within the
@@ -594,16 +593,16 @@ the first week of the year that contains a Thursday;
or, the week that has 4 January in it).
When three or fewer days of the first calendar week of the new year fall
within that year,
-then the ISO 8601 week-based system counts those days as part of week 52
+then the ISO\~8601 week-based system counts those days as part of week 52
or 53 of the preceding year.
For example, 1 January 2010 is a Friday,
meaning that just three days of that calendar week fall in 2010.
-Thus, the ISO\ 8601 week-based system considers these days to be part of
+Thus, the ISO\~8601 week-based system considers these days to be part of
week 53
.RB ( %V )
of the year 2009
.RB ( %G );
-week 01 of ISO\ 8601 year 2010 starts on Monday, 4 January 2010.
+week 01 of ISO\~8601 year 2010 starts on Monday, 4 January 2010.
Similarly, the first two days of January 2011 are considered to be part
of week 52 of the year 2010.
.SS glibc notes
@@ -622,7 +621,7 @@ may be specified.
or
.B O
modifiers, if present.)
-.PP
+.P
The following flag characters are permitted:
.TP
.B _
@@ -645,7 +644,7 @@ Swap the case of the result string.
(This flag works only with certain conversion specifier characters,
and of these, it is only really useful with
.BR %Z .)
-.PP
+.P
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 result string is padded (on the left) to the specified width.
@@ -667,7 +666,7 @@ specify any
.I errno
settings for
.BR strftime ().
-.PP
+.P
Some buggy versions of
.BR gcc (1)
complain about the use of
@@ -682,7 +681,7 @@ to circumvent this
problem.
A relatively clean one is to add an
intermediate function
-.PP
+.P
.in +4n
.EX
size_t
@@ -693,7 +692,7 @@ my_strftime(char *s, size_t max, const char *fmt,
}
.EE
.in
-.PP
+.P
Nowadays,
.BR gcc (1)
provides the
@@ -703,16 +702,16 @@ so that the above workaround is no longer required.
.SH EXAMPLES
.B RFC\~2822-compliant date format
(with an English locale for %a and %b)
-.PP
+.P
.in +4n
.EX
"%a,\ %d\ %b\ %Y\ %T\ %z"
.EE
.in
-.PP
+.P
.B RFC\~822-compliant date format
(with an English locale for %a and %b)
-.PP
+.P
.in +4n
.EX
"%a,\ %d\ %b\ %y\ %T\ %z"
@@ -721,11 +720,11 @@ so that the above workaround is no longer required.
.SS Example program
The program below can be used to experiment with
.BR strftime ().
-.PP
+.P
Some examples of the result string produced by the glibc implementation of
.BR strftime ()
are as follows:
-.PP
+.P
.in +4n
.EX
.RB "$" " ./a.out \[aq]%m\[aq]"