intofmtasc()

Converts an interval value to a character string, specifying the format.

Syntax

mint intofmtasc(intrvl_t *i, char *output, mint len, char *fmt);
  1. i is a pointer to an initialized interval variable to convert.
  2. output is a pointer to the buffer that receives the string for the value in i.
  3. strlen is the length of the outbuf buffer.
  4. fmt points to the formatting string.

Returns

Table 1. Return codes
Code Description
0 The conversion was successful.
<0 The conversion failed.

Usage

The fmt parameter defines the formatting mask. It must be either in year to month, or in day to fraction ranges.