home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / c / comlink / !ComLink / !TimeUtils / !Help < prev    next >
Encoding:
Text File  |  1993-10-21  |  3.0 KB  |  134 lines

  1.               !TimeUtils  © 1993 A.P.Senior
  2.  
  3.  !Help file
  4.  ~~~~~~~~~~
  5.  
  6. This application creates 4 system variables that return the time/date, these
  7. can be used within {} brackets in ComLink function/wimp keys, the tx window
  8. and also in scripts. The 4 variables are:
  9.  
  10. 1. real$time
  11.    ~~~~~~~~~
  12.  
  13.    {real$time} is a copy of time from the CMOS clock chip. The time will be in
  14.    the format:-
  15.                          23:15:45
  16.  
  17. 2. full$date
  18.    ~~~~~~~~~
  19.  
  20.    {full$date} will return the full date, the format is:-
  21.  
  22.                    Saturday 25th July 1992
  23.  
  24. 3. time$
  25.    ~~~~~
  26.  
  27.    {time$} is a copy of time from the CMOS clock chip. The time will be in
  28.    the format:-
  29.                          5:49 pm
  30.  
  31.    The format can be changes with a command line of the form:
  32.  
  33.    Set Time$Format %z12:%mi %am
  34.  
  35. 4. date$
  36.    ~~~~~
  37.  
  38.    {date$} will return the full date, the format is:-
  39.  
  40.                    Saturday 25th July 1993
  41.  
  42.    The format can be changes with a command line of the form:
  43.  
  44.    Set Date$Format %we %zdy%st %mo %ce%yr
  45.  
  46.  
  47. Variables 1. and 2. above have been provided for compatibility with earlier
  48. versions of !ComLink. Variables 3. and 4. above are new ones that may
  49. can have a user defined format.
  50.  
  51. Notes
  52. ~~~~~
  53. If variable 'Time$Format' does not exist the variable
  54. 'Time$' will return the time in the form:-
  55.  
  56.                      21:56
  57.  
  58. If variable 'Date$Format' does not exist the variable
  59. 'Date$' will return the date in the form:-
  60.  
  61.                     20/2/93
  62.  
  63.  
  64.                   Time format
  65.                   ~~~~~~~~~~~
  66.  
  67. The time and date formats are defined by system
  68. variables 'Time$Format' and 'Date$Format'. The
  69. strings allocated to these variables are built up of
  70. special character sequences. They can also contain
  71. plain text as well.
  72.  
  73. The special character sequences and their meaning
  74. are:-
  75.  
  76.   %12      Hours in 12 hour format
  77.   %24      Hours in 24 hour format
  78.  
  79.   %mi      Minutes
  80.  
  81.   %se      Seconds
  82.  
  83.   %cs      Centiseconds
  84.  
  85.   %am      Return 'am' or 'pm' as appropriate
  86.   %pm      As for %am
  87.  
  88.   %we      Weekday in full, eg 'Friday'
  89.   %w3      Weekday in 3 characters, eg 'Wed'
  90.   %wn      Weekday number, 1 for Sunday etc.
  91.  
  92.   %dy      Day of month, eg 05
  93.   %st      'st', 'nd', 'rd' or 'th' as appropriate
  94.  
  95.   %mo      Month in full, eg 'February'
  96.   %m3      Month as 3 characters, eg 'Feb'
  97.   %mn      Month as a number, eg '02'
  98.  
  99.   %ce      Century, eg '19'
  100.   %yr      Year, eg '93'
  101.  
  102.   %wk      Week of year, eg '31' (week starts on
  103.            Monday)
  104.  
  105.   %dn      Day of year, eg '320'
  106.  
  107.   %0       Insert an ASCII 0
  108.  
  109.   %%       Insert a %
  110.  
  111. Note that 'z' can follow the '%', to supress leading
  112. zeros. Eg, %12 will return the hour as '09' for nine
  113. o'clock, whereas %z12 will return '9'.
  114.  
  115. Examples, suppose we want the variable Date$ to
  116. return a string in the form:-
  117.  
  118.            February the 5th, 1993
  119.  
  120. We would set the system variable, 'Date$Format' using
  121. the command:-
  122.  
  123. *Set Date$Format %mo the %zdy%st, %ce%yr
  124.  
  125. Suppose we want Time$ to return a string in the
  126. form:-
  127.  
  128.            5-55 pm on Wednesday
  129.  
  130. Then use the command:-
  131.  
  132. *Set Time$Format %z12-%mi %am on %we
  133.  
  134.