MAINSAIL Language Manual, Section 30.20

previous   next   top   contents   index   framed top   this page unframed


30.20. $assembleDate

Figure 30–19. $assembleDate
LONG INTEGER
PROCEDURE   $assembleDate
                        (
INTEGER year;
                         
OPTIONAL INTEGER month,day;
                         
OPTIONAL BITS ctrlBits);

$assembleDate returns a MAINSAIL date given the year, month, and day.

year must not be 0, and must include the century (e.g., a value of 84 refers to the year 84 A.D., not to 2084 A.D.). If month and day are zero, they default to 1; otherwise, month must be between 1 (January) and 12 (December), inclusive, and day must be between 1 and 31, inclusive. An error occurs if a non-existent day of the month is specified, e.g., the 31st of June or the 29th of February in a non-leap year. If such an input value is detected, 0L is returned.

The valid ctrlBits bits are $localTime, $gmt, and errorOK.

If $localTime is specified (or if neither $localTime nor $gmt is specified), the input values are interpreted as a local date and returned in local date format. If $gmt is specified, a GMT format date is returned.

Unless errorOK is specified, an error message is generated for erroneous input values.

The standard MAINSAIL date and time formats are described in Section 24.1.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 30.20