HP C/iX Library Reference Manual (30026-90004)

340 Chapter5
HP C/iX Library Function Descriptions
strftime
%c is replaced by the locale's appropriate date and time representation.
%d is replaced by the day of the month as a decimal number (01-31).
%e is replaced by the day of the month as a decimal number (1-31 in a two-digit
right-justified field with leading space> fill).
%H is replaced by the hour (24-hour clock) as a decimal number (00-23).
%I is replaced by the hour (12-hour clock) as a decimal number (01-12).
%j is replaced by the day of the year as a decimal number (001-366).
%m is replaced by the month as a decimal number (01-12).
%M is replaced by the minute as a decimal number (00-59).
%p is replaced by the locale's equivalent of either AM or PM.
%S is replaced by the second as a decimal number (00-61).
%U is replaced by the week number of the year (Sunday as the first day of the week) as a
decimal number (00-53).
%w is replaced by the weekday as a decimal number [0 (Sunday)-6].
%W is replaced by the week number of the year (Monday as the first day of week 1) as
decimal number (00-53).
%x is replaced by the locale's appropriate date representation.
%X is replaced by the locale's appropriate time representation.
%y is replaced by the year without century as a decimal number (00-99).
%Y is replaced by the year with century as a decimal number.
%Z is replaced by the time zone name, or by no character if no time zone is determinable.
% is replaced by %.
The behavior is undefined for any conversion specification not described above.
If the total number of resulting characters (including the terminating null character) is not
more than
maxsize
, strftime returns the number of characters placed into the array
pointed to by
s
(not including the terminating null character). Otherwise, zero is returned
and the array contents are indeterminate.
See Also
ANSI C 4.12.3.5, POSIX.1 8.1