home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsd / evntshell / Docs / Calendar < prev    next >
Encoding:
Text File  |  1995-10-21  |  5.0 KB  |  219 lines

  1. This extension library should be installed
  2. using the FNshell_InstallLib routine so
  3. that the variables and storage space can be
  4. set up.
  5.  
  6. This library contains several routines
  7. related to the calendar. In all cases
  8. months are numbered from 1 to 12
  9. (1 = January, etc.) and years are the
  10. full A.D. year, (eg. 1993, etc.).
  11.  
  12. --------------------------------------------------------
  13.  
  14. PROCshell_CalenderSetMonthString()
  15. Params =>
  16.          str a 36 character string of 3 letter
  17.              month names, i.e. "JanFebMarApr
  18.              MayJunJulAugSepOctNovDec"
  19.  
  20. This call is provided so that you can set the
  21. language of the returned month strings from the
  22. other routines. For example a German version of
  23. your software would set the string to be "JanFeb
  24. MärAprMaiJunJulAugSepOktNovDez".
  25.  
  26. Ideally the string would be read from a message
  27. file so that it can easily be translated together
  28. with the other messages.
  29.  
  30. Installing the library with FNshell_InstallLib
  31. sets the string to English by default.
  32.  
  33. An error will be generated if the specified
  34. string is not 36 characters long.
  35.  
  36. --------------------------------------------------------
  37.  
  38. PROCshell_CalendarSetDayString()
  39. Params =>
  40.          str a 21 character string of 3 letter
  41.              day names, i.e. "SunMonTueWedThuFriSat"
  42.  
  43. This call is provided so that you can set the
  44. language of the returned day strings from the
  45. other routines. Ideally the string would be
  46. read from a message file so that it can easily
  47. be translated together with the other messages.
  48.  
  49. The call to FNshell_InstallLib sets the
  50. string to English by default.
  51.  
  52. An error will be generated if the specified
  53. string is not 21 characters long.
  54.  
  55. --------------------------------------------------------
  56.  
  57. PROCshell_CalenderGetTodaysDate()
  58. Params =>  
  59.          int day
  60.          int month 
  61.          int year 
  62.  
  63.        <=
  64.          int day   updated
  65.          int month updated
  66.          int year  updated
  67.  
  68. Updates the given variables with the
  69. current date, taken from TIME$ (will
  70. fail if format of TIME$ is not default
  71. English!)
  72.  
  73. --------------------------------------------------------
  74.  
  75. FNshell_CalenderDayOfWeek()
  76. Params =>
  77.          int date
  78.          int month nr
  79.          int year
  80.  
  81.        <=
  82.          int day nr (1 = Sun, 2 =
  83.              Mon, etc.
  84.  
  85. Returns the day of the week for a given
  86. date.
  87.  
  88. --------------------------------------------------------
  89.  
  90. FNshell_CalenderWeekDayString()
  91. Params =>
  92.          int day nr (1-7)
  93.  
  94.        <=
  95.          str three letter version of
  96.              a day of the week (1 ->
  97.              "Sun", 2 -> "Mon" etc.
  98.  
  99. Returns "***" if day nr was out of range.
  100.  
  101. --------------------------------------------------------
  102.  
  103. FNshell_CalenderMonthString()
  104. Params =>
  105.          int month nr (1-12)
  106.  
  107.        <=
  108.          str three letter version of
  109.              a month (1 -> "Jan",
  110.              2 -> "Feb", etc.)
  111.  
  112. Returns "***" if month nr was out of range.
  113.  
  114. --------------------------------------------------------
  115.  
  116. FNshell_CalenderMonthNumber()
  117. Params =>
  118.          str three letter version of
  119.              a month. i.e. "Jan"
  120.  
  121.        <=
  122.          int month nr (1-12)
  123.  
  124. --------------------------------------------------------
  125.  
  126. FNshell_CalenderDateString()
  127. Params =>
  128.          int day
  129.          int month nr
  130.          int year
  131.  
  132.        <=
  133.          str date, i.e "Fri 18th
  134.              Oct 1991"
  135.  
  136. --------------------------------------------------------
  137.  
  138. FNshell_CalenderDateValid()
  139. Params =>
  140.          int day
  141.          int month
  142.          int year
  143.  
  144.        <=
  145.          bool TRUE  date is valid
  146.               FALSE date is not valid
  147.  
  148. --------------------------------------------------------
  149.  
  150. FNshell_CalenderDaysInMonth()
  151. Params =>
  152.          int month nr (1-12)
  153.          int year
  154.          
  155.        <=
  156.          int nr of days in month
  157.  
  158. Leap years are taken into account.
  159.  
  160. --------------------------------------------------------
  161.  
  162. FNshell_CalenderDaysInYear()
  163. Params =>
  164.          int year
  165.  
  166.        <=
  167.          int nr of days
  168.  
  169. Leap years are taken into account.
  170.  
  171. --------------------------------------------------------
  172.  
  173. FNshell_CalenderLeapYear()
  174. Params =>
  175.          int year
  176.  
  177.        <=
  178.          bool TRUE  year is a leap year
  179.               FALSE year is not a leap year
  180.               
  181. --------------------------------------------------------
  182.  
  183. FNshell_CalenderDayOfYear()
  184. Params =>
  185.          int day
  186.          int month
  187.          int year
  188.  
  189.        <=
  190.          int day of year
  191.  
  192. --------------------------------------------------------
  193.  
  194. FNshell_CalenderDaysBetween()
  195. Params =>
  196.          int day   (1st date)
  197.          int month (1st date)
  198.          int year  (1st date)
  199.          int day   (2nd date)
  200.          int month (2nd date)
  201.          int year  (2nd date)
  202.  
  203.        <=
  204.          int nr of days between dates
  205.  
  206. --------------------------------------------------------
  207.  
  208. FN_shell_CalLib_Init
  209. =>    None
  210.  
  211. <=    bool    TRUE if module initialised correctly
  212.          FALSE otherwise
  213.  
  214. Normally called automatically when the library file
  215. is loaded by FNshell_InstallLib. If the library
  216. code is appended to the main program instead it will
  217. need to be called to initialise the calendar module.
  218.  
  219. --------------------------------------------------------