HP-UX Reference (11i v1 05/09) - 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 first day of the week, rules corresponding to
%V) using tht 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
To use the _INCLUDE__STDC_A1_SOURCE
prototype, pass the _INCLUDE__STDC_A1_SOURCE
flag as a compiler option.
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.
Environment Variables
TZ determines the time zone name substituted for the %Z and %z directives. The time zone name is
determined by calling the function tzset() which sets the external variable tzname (see ctime(3C)).
International Code Set Support
Single- and multi-byte character code sets are supported.
HP-UX 11i Version 1: September 2005 − 3 − Hewlett-Packard Company Section 3−−1041