HP-UX Reference (11i v2 07/12) - 3 Library Functions N-Z (vol 7)

w
wcsftime(3C) wcsftime(3C)
%Om The month using the locale’s alternative numeric symbols.
%OM The minutes using the locale’s alternative numeric symbols.
%OS The seconds using the locale’s alternative numeric symbols.
%Ou The weekday as a number in the locale’s alternative representation (Monday=1).
%OU The week number of the year (Sunday as the first day of the week, rules corresponding to
%U) using the locale’s alternative numeric symbols.
%OV The week number of the year (Monday as the rst day of the week, rules corresponding to
%V) using the locale’s alternative numeric symbols.
%Ow The number of the weekday (Sunday=0) using the locale’s alternative numeric symbols.
%OW The week number of the year (Monday as the first day of the week) using the locale’s alter-
native numeric symbols.
%Oy The year (offset from %C) in the locale’s alternative representation and using the locale’s
alternative symbols.
Field Width and Precision
An optional field width and precision specification can immediately follow the initial % of a directive in the
following order:
[
-0]w The decimal digit string w specifies a minimum field width in which the result of the
conversion is right- or left-justified. It is right-justified (with space padding) by
default. If the optional - character is specified, it is left-justified with space padding
on the right. If the optional 0 character is specified, it is right-justified and padded
with zeros on the left.
.p The decimal digit string p specifies the minimum number of digits to appear for the
d,
H, I, j, m, M, o, S, U,
w, W, y and Y directives, and the maximum number of
corresponding wide characters to be used from the
a, A, b, B,
c, D, E, F, h, n, N, p, r,
t, T, x, X, z, Z, and % directives. In the first case, if a directive supplies fewer digits
than specified by the precision, it is expanded with leading zeros. In the second case,
if a directive supplies more characters than specified by the precision, excess charac-
ters are truncated on the right.
If no field width or precision is specified for a d, H
, I, m, M, S, U, W, y,or j directive, a default of .2 is
used for all but
j for which .3 is used.
APPLICATION USAGE
The Multibyte Support Extension Only prototype of wcsftime() is available to applications
if they are
c99 conformant. (OR)
Compiled with the -D_XOPEN_SOURCE
macro with the value 500.
The application must also be compiled with the environment variable
UNIX_STD set to the value 98 and
exported to get the Multibyte Support Extension behavior. This manpage previously documented the usage
of the _INCLUDE__STDC_A1_SOURCE define for this function. This is NOT recommended, and instead
HP strongly recommends using the method described above.
EXTERNAL INFLUENCES
Locale
The LC_TIME category determines the characters to be substituted for those directives described above as
being from the locale.
The LC_CTYPE category determines the interpretation of the bytes within format as single and/or multi-
byte characters as well as how wide-character conversions are done.
The LC_NUMERIC category determines the characters used to form numbers for those directives that pro-
duce numbers in the output. If ALT_DIGITS (see langinfo(5)) is defined for the locale, the characters so
specified are used in place of the default ASCII characters. If both ALT_DIGITS and ALT_DIGIT is
defined for the locale, ALT_DIGITS will take precedence over ALT_DIGIT .
626 Hewlett-Packard Company 3 HP-UX 11i Version 2: December 2007 Update