X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/7b00c0c43f52e9d27168e67a26aac19065cdb40c..ad3c9f2af814c84582fdd1649e49ec4f68572c5a:/stdtime/FreeBSD/strftime.3 diff --git a/stdtime/FreeBSD/strftime.3 b/stdtime/FreeBSD/strftime.3 index 1a8c9e7..5454a07 100644 --- a/stdtime/FreeBSD/strftime.3 +++ b/stdtime/FreeBSD/strftime.3 @@ -36,7 +36,8 @@ .Dt STRFTIME 3 .Os .Sh NAME -.Nm strftime +.Nm strftime , +.Nm strftime_l .Nd format date and time .Sh LIBRARY .Lb libc @@ -44,10 +45,20 @@ .In time.h .Ft size_t .Fo strftime -.Fa "char * restrict buf" +.Fa "char *restrict s" .Fa "size_t maxsize" -.Fa "const char * restrict format" -.Fa "const struct tm * restrict timeptr" +.Fa "const char *restrict format" +.Fa "const struct tm *restrict timeptr" +.Fc +.In time.h +.In xlocale.h +.Ft size_t +.Fo strftime_l +.Fa "char *restrict s" +.Fa "size_t maxsize" +.Fa "const char *restrict format" +.Fa "const struct tm *restrict timeptr" +.Fa "locale_t loc" .Fc .Sh DESCRIPTION The @@ -55,7 +66,7 @@ The function formats the information from .Fa timeptr into the buffer -.Fa buf +.Fa s , according to the string pointed to by .Fa format . .Pp @@ -79,6 +90,14 @@ returns the number of characters in the array, not counting the terminating NUL. Otherwise, zero is returned and the buffer contents are indeterminate. .Pp +Although the +.Fn strftime +function uses the current locale, the +.Fn strftime_l +function may be passed a locale directly. See +.Xr xlocale 3 +for more information. +.Pp The conversion specifications are copied to the buffer after expansion as follows:- .Bl -tag -width "xxxx" @@ -233,7 +252,8 @@ is replaced by .Xr ctime 3 , .Xr printf 3 , .Xr strptime 3 , -.Xr wcsftime 3 +.Xr wcsftime 3 , +.Xr xlocale 3 .Sh STANDARDS The .Fn strftime @@ -260,11 +280,12 @@ with a lot of extensions including .Ql %u , .Ql \&%V , .Ql %z , +and .Ql %+ . .Pp The peculiar week number and year in the replacements of .Ql %G , -.Ql %g +.Ql %g , and .Ql \&%V are defined in ISO 8601: 1988.