home *** CD-ROM | disk | FTP | other *** search
- !TimeUtils © 1993 A.P.Senior
-
- !Help file
- ~~~~~~~~~~
-
- This application creates 4 system variables that return the time/date, these
- can be used within {} brackets in ComLink function/wimp keys, the tx window
- and also in scripts. The 4 variables are:
-
- 1. real$time
- ~~~~~~~~~
-
- {real$time} is a copy of time from the CMOS clock chip. The time will be in
- the format:-
- 23:15:45
-
- 2. full$date
- ~~~~~~~~~
-
- {full$date} will return the full date, the format is:-
-
- Saturday 25th July 1992
-
- 3. time$
- ~~~~~
-
- {time$} is a copy of time from the CMOS clock chip. The time will be in
- the format:-
- 5:49 pm
-
- The format can be changes with a command line of the form:
-
- Set Time$Format %z12:%mi %am
-
- 4. date$
- ~~~~~
-
- {date$} will return the full date, the format is:-
-
- Saturday 25th July 1993
-
- The format can be changes with a command line of the form:
-
- Set Date$Format %we %zdy%st %mo %ce%yr
-
-
- Variables 1. and 2. above have been provided for compatibility with earlier
- versions of !ComLink. Variables 3. and 4. above are new ones that may
- can have a user defined format.
-
- Notes
- ~~~~~
- If variable 'Time$Format' does not exist the variable
- 'Time$' will return the time in the form:-
-
- 21:56
-
- If variable 'Date$Format' does not exist the variable
- 'Date$' will return the date in the form:-
-
- 20/2/93
-
-
- Time format
- ~~~~~~~~~~~
-
- The time and date formats are defined by system
- variables 'Time$Format' and 'Date$Format'. The
- strings allocated to these variables are built up of
- special character sequences. They can also contain
- plain text as well.
-
- The special character sequences and their meaning
- are:-
-
- %12 Hours in 12 hour format
- %24 Hours in 24 hour format
-
- %mi Minutes
-
- %se Seconds
-
- %cs Centiseconds
-
- %am Return 'am' or 'pm' as appropriate
- %pm As for %am
-
- %we Weekday in full, eg 'Friday'
- %w3 Weekday in 3 characters, eg 'Wed'
- %wn Weekday number, 1 for Sunday etc.
-
- %dy Day of month, eg 05
- %st 'st', 'nd', 'rd' or 'th' as appropriate
-
- %mo Month in full, eg 'February'
- %m3 Month as 3 characters, eg 'Feb'
- %mn Month as a number, eg '02'
-
- %ce Century, eg '19'
- %yr Year, eg '93'
-
- %wk Week of year, eg '31' (week starts on
- Monday)
-
- %dn Day of year, eg '320'
-
- %0 Insert an ASCII 0
-
- %% Insert a %
-
- Note that 'z' can follow the '%', to supress leading
- zeros. Eg, %12 will return the hour as '09' for nine
- o'clock, whereas %z12 will return '9'.
-
- Examples, suppose we want the variable Date$ to
- return a string in the form:-
-
- February the 5th, 1993
-
- We would set the system variable, 'Date$Format' using
- the command:-
-
- *Set Date$Format %mo the %zdy%st, %ce%yr
-
- Suppose we want Time$ to return a string in the
- form:-
-
- 5-55 pm on Wednesday
-
- Then use the command:-
-
- *Set Time$Format %z12-%mi %am on %we
-
-