[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    wcsftime(3I) manual page Table of Contents

Name

wcsftime - convert date and time to wide character string

Synopsis

cc [ flag ... ] file ... -lw [ library ... ]

#include <wchar.h>

size_t wcsftime(wchar_t *wcs, size_t maxsize, const char *format, const struct tm *timptr);

Description

The wcsftime() function places wide-character codes into the array pointed to by wcs as controlled by the string pointed to by format.

This function behaves as if the character string generated by the strftime(3C) function is passed to the mbstowcs(3C) function as the character string argument, and mbstowcs() places the result in the wide character string argument of the wcsftime() function, up to a limit of maxsize wide-character codes.

If copying takes place between objects that overlap, the behaviour is undefined.

Return Values

If the total number of resulting wide character codes (including the terminating null wide-character code) is no more than maxsize, wcsftime() returns the number of wide-character codes placed into the array pointed to by wcs, not including the terminating null wide-character code. Otherwise, 0 is returned and the contents of the array are indeterminate.

wcfstime() uses malloc(3C) and should malloc() fail, errno will be set by malloc().

See Also

malloc(3C) , mbstowcs(3C) , strftime(3C)


Table of Contents