A TimeDate component monitors the system time and date; also, it can change the system time and date.
Standard Properties:
class, parent, proto, version.
systemClock long
This read-only property is a count of the number of milliseconds since the system last rebooted; it "wraps around" about once every 49 hours. It is useful for conducting timing tests.
timeInterest integer (0-60)
This property determines how often the component will generate a _timeChanged() event.
If this property is zero, then no such events will be generated.
If this property is greater than zero, then a _timeChanged() event will be generated at midnight and every timeInterest minutes later. Thus, if timeInterest is one, then _timeChanged() events will occur every minute; if timeInterest is sixty, then _timeChanged() events will occur every hour.
_dateChanged( self AS timedate )
This event is generated whenever the date changes; either the system date has been changed or time has passed.
This action returns the current date. The returned structure has the following fields:
STRUCT Date
DIM year AS integer
DIM month AS integer REM 1 = January ... 12 = December
DIM day AS integer
END STRUCT
GetDayOfWeek( year AS integer, month AS integer, day AS integer ) AS integer
This action returns the day of the week for a given day of the month in a given year. A return value of 1 means Sunday, 2 means Monday, ... and 7 means Saturday.
year integer (1901-2099)
The year.
month integer (1-12)
The month. 1 means January, 2 means February, ... 12 means December.
year integer (1901-2099)
The year. (This is necessary for computing the length of February in leap year.)
month integer (1-12)
The month. 1 means January, 2 means February, ... 12 means December.
GetTime ( ) AS STRUCT TimeOfDay
This action returns the current time. The returned structure has the following fields:
STRUCT TimeOfDay
DIM hour AS integer REM 0 - 23
DIM minute AS integer
DIM second AS integer
END STRUCT