]> git.saurik.com Git - apple/libc.git/blob - stdtime/FreeBSD/strftime.3.patch
Libc-498.tar.gz
[apple/libc.git] / stdtime / FreeBSD / strftime.3.patch
1 --- _SB/Libc/stdtime/FreeBSD/strftime.3 2004-11-25 11:38:45.000000000 -0800
2 +++ _SB/Libc/stdtime/FreeBSD/strftime.3.edit 2006-06-28 16:55:53.000000000 -0700
3 @@ -40,7 +40,8 @@
4 .Dt STRFTIME 3
5 .Os
6 .Sh NAME
7 -.Nm strftime
8 +.Nm strftime ,
9 +.Nm strftime_l
10 .Nd format date and time
11 .Sh LIBRARY
12 .Lb libc
13 @@ -48,10 +49,20 @@
14 .In time.h
15 .Ft size_t
16 .Fo strftime
17 -.Fa "char * restrict buf"
18 +.Fa "char *restrict s"
19 .Fa "size_t maxsize"
20 -.Fa "const char * restrict format"
21 -.Fa "const struct tm * restrict timeptr"
22 +.Fa "const char *restrict format"
23 +.Fa "const struct tm *restrict timeptr"
24 +.Fc
25 +.In time.h
26 +.In xlocale.h
27 +.Ft size_t
28 +.Fo strftime_l
29 +.Fa "char *restrict s"
30 +.Fa "size_t maxsize"
31 +.Fa "const char *restrict format"
32 +.Fa "const struct tm *restrict timeptr"
33 +.Fa "locale_t loc"
34 .Fc
35 .Sh DESCRIPTION
36 The
37 @@ -59,7 +70,7 @@
38 function formats the information from
39 .Fa timeptr
40 into the buffer
41 -.Fa buf
42 +.Fa s ,
43 according to the string pointed to by
44 .Fa format .
45 .Pp
46 @@ -83,6 +94,14 @@
47 terminating NUL.
48 Otherwise, zero is returned and the buffer contents are indeterminate.
49 .Pp
50 +Although the
51 +.Fn strftime
52 +function uses the current locale, the
53 +.Fn strftime_l
54 +function may be passed a locale directly. See
55 +.Xr xlocale 3
56 +for more information.
57 +.Pp
58 The conversion specifications are copied to the buffer after expansion
59 as follows:-
60 .Bl -tag -width "xxxx"
61 @@ -226,7 +245,8 @@
62 .Xr ctime 3 ,
63 .Xr printf 3 ,
64 .Xr strptime 3 ,
65 -.Xr wcsftime 3
66 +.Xr wcsftime 3 ,
67 +.Xr xlocale 3
68 .Sh STANDARDS
69 The
70 .Fn strftime
71 @@ -253,11 +273,12 @@
72 .Ql %u ,
73 .Ql \&%V ,
74 .Ql %z ,
75 +and
76 .Ql %+ .
77 .Pp
78 The peculiar week number and year in the replacements of
79 .Ql %G ,
80 -.Ql %g
81 +.Ql %g ,
82 and
83 .Ql \&%V
84 are defined in ISO 8601: 1988.