1wcsftime(3C)             Standard C Library Functions             wcsftime(3C)
2
3
4

NAME

6       wcsftime - convert date and time to wide character string
7

SYNOPSIS

9       #include <wchar.h>
10
11
12   XPG4 and SUS
13       size_t wcsftime(wchar_t *wcs, size_t maxsize, const char *format,
14            const struct tm *timptr);
15
16
17   Default and other standards
18       size_t wcsftime(wchar_t *restrict wcs, size_t maxsize,
19            const wchar_t *restrict format,
20            const struct tm *restrict timptr);
21
22

DESCRIPTION

24       The  wcsftime()  function  is  equivalent to the strftime(3C) function,
25       except that:
26
27           o      The argument wcs points to the initial element of  an  array
28                  of  wide-characters into which the generated output is to be
29                  placed.
30
31           o      The argument maxsize indicates the maximum number  of  wide-
32                  characters to be placed in the output array.
33
34           o      The  argument format is a wide-character string and the con‐
35                  version  specifications  are   replaced   by   corresponding
36                  sequences of wide-characters.
37
38           o      The  return  value  indicates  the number of wide-characters
39                  placed in the output array.
40
41
42       If copying takes place between objects that overlap,  the  behavior  is
43       undefined.
44

RETURN VALUES

46       If  the  total number of resulting wide character  codes (including the
47       terminating null wide-character code) is no more  than  maxsize,  wcsf‐
48       time()  returns  the  number  of  wide-character codes  placed into the
49       array pointed to by wcs, not including the terminating null  wide-char‐
50       acter  code. Otherwise, 0 is returned and the contents of the array are
51       indeterminate.
52
53
54       The wcfstime() function uses malloc(3C) and should malloc() fail, errno
55       will be set by malloc().
56

ATTRIBUTES

58       See attributes(5) for descriptions of the following attributes:
59
60
61
62
63       ┌─────────────────────────────┬─────────────────────────────┐
64       │ATTRIBUTE TYPE               │ATTRIBUTE VALUE              │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │CSI                          │Enabled                      │
67       ├─────────────────────────────┼─────────────────────────────┤
68       │Interface Stability          │Standard                     │
69       ├─────────────────────────────┼─────────────────────────────┤
70       │MT-Level                     │MT-Safe with exceptions      │
71       └─────────────────────────────┴─────────────────────────────┘
72

SEE ALSO

74       malloc(3C), setlocale(3C), strftime(3C), attributes(5), standards(5)
75

NOTES

77       The  wcsftime()  function  can be used safely in multithreaded applica‐
78       tions, as long as setlocale(3C) is  not  being  called  to  change  the
79       locale.
80
81
82
83SunOS 5.11                        1 Nov 2003                      wcsftime(3C)
Impressum