previous next top contents index framed top this page unframed
Figure 30–20. $assembleDateAndTime
| PROCEDURE $assembleDateAndTime (INTEGER year; OPTIONAL INTEGER month,day, hour,minute,second; PRODUCES LONG INTEGER date,time; OPTIONAL BITS ctrlBits); |
$assembleDateAndTime produces a MAINSAIL date and time given a year, month, day, hour, minute and second. If month and day are not specified, they default to 1. The restrictions on the year, month, day, hour, minute, and second are the same as for $assembleDate and $assembleTime; date and time are set to 0L if erroneous values are detected.
Valid ctrlBits bits are errorOK, $localTime, $gmt, $localTimeToGMT, and $GMTtoLocalTime. Of the latter four bits, at most one can be specified; they are interpreted as shown:
| Bit | Input Parameters Interpreted as | Output Format for date and time |
|---|---|---|
| $localTime | Local time | Local format |
| $localTimeToGMT | Local time | GMT format |
| $GMTtoLocalTime | GMT | Local format |
| $gmt | GMT | GMT format |
If none of these four bits is specified, $localTime is assumed. The caveats described in Section 24.3 regarding conversion between local time and GMT apply if $localTimeToGMT is set.
Unless errorOK is specified, an error message is generated for erroneous input values.
MAINSAIL Language Manual, Section 30.21