Go forward to time
Go backward to mktime
Go up to Timefns
Go to the top op libc
`strftime'--flexible calendar time formatter
size_t strftime(char *S, size_t MAXSIZE,
const char *FORMAT, const struct tm *TIMP);
`strftime' converts a `struct tm' representation of the time (at TIMP)
into a string, starting at S and occupying no more than MAXSIZE
You control the format of the output using the string at FORMAT.
`*FORMAT' can contain two kinds of specifications: text to be copied
literally into the formatted string, and time conversion
specifications. Time conversion specifications are two-character
sequences beginning with ``%'' (use ``%%'' to include a percent sign in
the output). Each defined conversion specification selects a field of
calendar time data from `*TIMP', and converts it to a string in one of
the following ways:
An abbreviation for the day of the week.
The full name for the day of the week.
An abbreviation for the month name.
The full name of the month.
A string representing the complete date and time, in the form
Mon Apr 01 13:13:13 1992
The day of the month, formatted with two digits.
The day of the month, formatted with leading space if single digit.
The hour (on a 24-hour clock), formatted with two digits.
The hour (on a 12-hour clock), formatted with two digits.
The count of days in the year, formatted with three digits (from
``001'' to ``366'').
The month number, formatted with two digits.
The minute, formatted with two digits.
Either ``AM'' or ``PM'' as appropriate.
The second, formatted with two digits.
The week number, formatted with two digits (from ``00'' to ``53'';
week number 1 is taken as beginning with the first Sunday in a
year). See also `%W'.
A single digit representing the day of the week: Sunday is day `0'.
Another version of the week number: like ``%U'', but counting week
1 as beginning with the first Monday in a year.
A string representing the complete date, in a format like
Mon Apr 01 1992
A string representing the full time of day (hours, minutes, and
seconds), in a format like
The last two digits of the year.
The full year, formatted with four digits to include the century.
The time zone name. If tm_isdst is -1, no output is generated.
Otherwise, the time zone name based on the TZ environment variable
A single character, ``%''.
When the formatted time takes up no more than MAXSIZE characters, the
result is the length of the formatted string. Otherwise, if the
formatting operation was abandoned due to lack of room, the result is
`0', and the string starting at S corresponds to just those parts of
`*FORMAT' that could be completely filled in within the MAXSIZE limit.
ANSI C requires `strftime', but does not specify the contents of `*S'
when the formatted string would require more than MAXSIZE characters.
`strftime' requires no supporting OS subroutines.
Created Mon Nov 8 17:42:55 2004 on tillpc with info_to_html version 0.9.6.