Any numerical Genstat data structure can be used to store dates and times. These functions allow the various components of a date and time to be calculated from a stored date-time value:
DAY |
Day of month |
---|---|
MONTH |
Month |
YEAR |
Year |
WEEKDAY |
Day of week |
NDAYINYEAR |
Day number in year (starting at a defined month) |
NWEEKINYEAR |
Week number in year |
MFRACTION |
Number of the period of a specified length within a month |
LEAPYEAR |
Indicates whether date is in a leap year |
HOURS |
Hours (on 24 hour clock) corresponding to a date-time value |
MINUTES |
Minutes past the hour corresponding to a date-time value |
SECONDS |
Seconds during the minute corresponding to a date-time value |
These functions calculate date and time values from calender and clock information:
DATE |
Constructs a date value from day, month and year |
---|---|
TIME |
Constructs time value from hours, minutes and seconds |
These functions provide information about the amount of computing time used in the current Genstat run, or the data and time currently recorded on the computer:
CPUTIME |
Currently used cpu time |
---|---|
NOW |
Current date and time |