wcsftime(3)

wcsftime3

Convert date and time to a wide-character string

Usage

#include <wchar.h>

size_t

wcsftime(wchar_t *restrict wcs, size_t maxsize, const wchar_t *restrict format, const struct tm *restrict timeptr);

#include <wchar.h>

#include <xlocale.h>

size_t

wcsftime_l(wchar_t *restrict wcs, size_t maxsize, const wchar_t *restrict format, const struct tm *restrict timeptr, locale_t loc);

Library

Standard C Library (libc, -lc)

Overview

The wcsftime() function is equivalent to the strftime() function, except for the types of its arguments. Refer to strftime(3) for a detailed description.

While the wcsftime() function uses the current locale, the wcsftime_l() function may be passed a locale directly. See xlocale(3) for more information.

Compatibility

Some early implementations of wcsftime() had a format argument with type const char *, instead of const wchar_t *.

Releases

145 releases since Mac OS X 10.3; the text changed 1 time.

  1. 10.3–10.4.11
  2. 10.5–26.5

Standards

The wcsftime() function conforms to ISO/IEC 9899:1999 (“ISO C99”).

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.