strftime.3c (2010 09)

s
strftime(3C) strftime(3C)
week is week 1.
%w Weekday as a decimal number [0(Sunday),6].
%W Week number of the year (Monday as the first day of the week) as a decimal number
[00,53]. All days in a new year preceding the first Monday are considered to be in week
0.
%x Locales appropriate date representation.
%X Locales appropriate time representation.
%y Year without century as a decimal number [00,99].
%Y Year with century as a decimal number.
%z Offset from UTC in the ISO 8601:2000 standards format (
+hhmm or -hhmm), or by no
characters if no timezone is determinable.
%Z Time zone name (or by no characters if no time zone exists).
%% The percent (%) character.
The following directives are provided for backward compatibility with the directives supported by
date
and the ctime() functions. These directives may be removed in a future release. It is recommended
that the directives above be used in preference to those below.
%E Locale’s combined Emperor/Era name and year (use
%EC%Ey instead).
%B instead).
%N Locale’s Emperor/Era name (use
%EC instead).
%o Locale’s Emperor/Era year (use %Ey instead).
If a directive is not one of the above, the behavior is undefined.
%g, %G, and %V give values according to the ISO 8601:2000 standard week-based year. In this system,
weeks begin on a Monday and week 1 of the year is the week that includes January 4th, which is also the
week that includes the first Thursday of the year, and is also the first week that contains at least four
days in the year. If the first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of the
last week of the preceding year; thus, for Saturday 2nd January 1999, %G is replaced by 1998 and
%V is
replaced by 53. If December 29th, 30th, or 31st is a Monday, it and any following days are part of week 1
of the following year. Thus, for Tuesday 30th December 1997,
%G is replaced by 1998 and %V is replaced
by 01.
Modified Conversion Specifiers
Some conversion specifiers can be modified by the E or O modifier characters to indicate that an alterna-
tive format or specification should be used rather than the one normally used by the unmodified conver-
sion specifier. If the alternative format or specification does not exist for the current locale, the behavior
will be as if the unmodified conversion specification were used. Alternative numeric symbols refers to
those symbols defined by the
ALT_DIGIT (see langinfo (5)) in the locale.
%Ec The locales alternative appropriate date and time representation.
%EC The name of the base year (period/Emperor/Era) in the locales alternative representa-
tion.
%Ex The locale’s alternative date representation
%EX The locale’s alternative time representation.
%Ey The offset from %EC (year only) in the locales alternative representation.
%EY The full alternative year representation.
%Od The day of the month, using the locales alternative numeric symbols, filled as needed
with leading zeros if there is any alternative symbol for zero, otherwise with leading
spaces.
%Oe the day of the month, using the locale’s alternative numeric symbols, filled as needed with
leading spaces.
%OH The hour (24-hour clock) using the locale’s alternative numeric symbols.
%OI The hour (12-hour clock) using the locale’s alternative numeric symbols.
%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 that locales alternative numeric symbols.
%Ow The number of the weekday (Sunday=0) using the locale’s alternative numeric symbols.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010