Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

wcsftime(3) OSS Library Calls Reference Manual
timeptr Points to a type tm structure that contains broken-down time information.
DESCRIPTION
The wcsftime( ) function formats the data in the timptr parameter according to the specification
contained in the format parameter and places the resulting wide-character string into the wcs
parameter. No more than the number of wide characters specified by the maxsize parameter are
written to the array, including the terminating null wide character.
The wcsftime( ) function behaves the same as the strftime( ) function, except that the ouput
buffer is wchar_t. Only the wchar.h header file needs to be specified for the wcsftime( ) func-
tion.
This function uses the local time-zone information.
The format parameter consists of a series of zero or more conversion specifiers and ordinary
characters. Each conversion specification starts with a % (percent sign) and ends with a conver-
sion code character that specifies the conversion format. The function replaces the conversion
specification with the appropriately formatted date or time value. Ordinary characters are written
to the output buffer unchanged.
The format parameter has the following syntax:
[ordinary-text][%[[-|0]width][.precision] format-code [ordinary-text]]...
ordinary-text Text that is copied to the output parameter with no changes.
width A decimal digit string that specifies the minimum field width. If the width of
the item equals or exceeds the minimum field width, the minimum is
ignored. If the width of the item is less than the minimum field width, the
function justifies and pads the item. The optional - (minus sign) or 0 (zero
digit) control the justification and padding as follows:
None The item is right justified and spaces are added to the begin-
ning of the item to fill the minimum width.
Minus sign The item is left justified and spaces are added to the end of
the item to fill the minimum width.
Zero digit The item is right justified and zeros are added to the begin-
ning of the item to fill the minimum width.
precision A decimal string that specifies the minimum number of digits to appear for
the d, H, I, j, m, M, S, U, w, W, y, and Y conversion formats and the max-
imum number of characters to used from the a, A, b,
B, c, D, E, h, n, t, T, x,
X, Z,
and % conversion
formats.
If no field width or precision is specified for the d, H, I, m, M, S, U, W,ory
conversion character, a default precision of .2 is used. If no field width or
precision is specified for the j conversion character, a default precision of 3
is used.
format-code A single character that specifies the date and time conversion to perform.
The following list describes the conversion code characters:
a The short day of the week is output as a string as defined for
the current locale (Mon, for example).
812 Hewlett-Packard Company 527187-017