Next: wcslcat, Previous: wcscspn, Up: Wchar strings
wcsftime—convert date and time to a formatted wide-character string #include <time.h>
#include <wchar.h>
size_t wcsftime(wchar_t *s, size_t maxsize,
const wchar_t *format, const struct tm *timp);
Description
wcsftime is equivalent to strftime, except that:
(The difference in all of the above being wide characters versus regular
characters.)
See strftime for the details of the format specifiers.
Returns
0, and the wide-character string starting at s corresponds to just those
parts of *format that could be completely filled in within the
maxsize limit.
Portability
wcsftime, but do not specify the contents of
*s when the formatted string would require more than
maxsize characters. Unrecognized specifiers and fields of
timp that are out of range cause undefined results. Since some
formats expand to 0 bytes, it is wise to set *s to a nonzero
value beforehand to distinguish between failure and an empty string.
This implementation does not support s being NULL, nor overlapping
s and format.
wcsftime requires no supporting OS subroutines.
See Also
strftime