#include <ifxgls.h> int ifx_gl_format_date(char *datestr, int datebytes, mi_date *date, char *format)
If format is NULL, then the format is determined from the environment as follows:
If format is not NULL, then it must point to a string which follows the rules described in the FORMAT section below.
If a conversion specification does not correspond to any of the above, the behavior is undefined.
An optional justification, field width and precision specification can immediately follow the initial % of a directive according to the following:
[-|0][<width>][.<precision>]
The field width specifier may be followed by a precision directive defined to be a period followed by a decimal value.
For the C, d, e, Ey, iy, iY, j, m, u, w, y and Y directives, the value of <precision> specifies the minimum number of digits to appear. If a directive supplies fewer digits than specified by the precision, it will be padded with leading zeros.
For the a, A, b, B, EC, Eg, and h, directives, the value of <precision> specifies the maximum number of characters to be used. If a value to be formatted has more characters than specified by the precision, the result will be truncated on the right.
The values of <width> and <precision> do not affect the Ex, EY, n, t, x or %.
The values of <width> and <precision> affect each element of the D directive. For example %6.4D would be printed as "%6.4m/%6.4d/%6.4y".
For the directives modified with O (Alternate Digits) the field width and relates to display width rather than actual number of digits. The precision is still the minimum number of digits printed.
The d, Ey, iy, m, u, w, and y directives have a default precision of .2.
The j directive has a default precision of 3.
The Y and iY directives have a default precision of 4.