.TFMT - format time number into date/time string.

Alternate Entry Name: _TFMT

Usage:

B:
   %b/manif/t_ctrl
   size = .tfmt(string, ssize, format, timenum,
                tzloc, parse);
C:
   #include <time.h>
   #include <t_ctrl.h>
   size_t _tfmt(char *string, size_t ssize,
                const char *format, time_t timenum,
                _T_locale tzloc, const _D_ctrl *parse);

Where:

string
points to a region of memory where .TFMT can store the date/time string it produces.
ssize
is the maximum number of bytes that .TFMT may store in "string".
format
points to a string which describes the format of the date/time string you want .TFMT to produce. This string is similar to a "printf"-style format string, with "%" placeholders to stand for date/time values. For further information on format strings, see "expl b lib .tmfmt".
timenum
is an integer representing a date and time, expressed as the number of seconds since 0:00 a.m. 1 January 1970 GMT.
tzloc
is a time zone locale reference value. A value of zero will use the default locale. For more information on such values, see "expl b tz".
parse
points to a table of names: names of the days ("Monday", "Tuesday", etc.), names of months ("January", "February", etc.) and so on. If you supply a NULL pointer for this argument, you get names in the default locale (as set by .DLANG).
size
is the number of characters in the string that .TFMT produces. If the date/time string that .TFMT produces is too big to fit in "string", .TFMT returns zero and the contents of "string" are indeterminate.

Description:

.TFMT creates a date/time string of a given "format", based on the given time number and time zone locale. In all other respects, .TFMT works like the .TMFMT function.

See Also:

expl b lib .tmfmt
for further information on names tables and format strings.
expl b lib .dlang
for making a new names table the default.
expl c lib strftime
for a similar function.

Copyright © 1996, Thinkage Ltd.