Date


These toolkits add the extended date functions found in Smsq/e to Qdos and Minerva, thus allowing programs that rely on this functionality to run under those operating systems. Minerva already has the extended DATE function built in (presumably this is why it was included in Smsq/e), therefore the toolkit comes in two versions; one with DATE and the other without. As pre-JS QL ROMs do not allow keywords in the system ROM to be overwritten by new definitions, the Minerva version could be used there too, saving a few bytes. (Ie, you cannot update the DATE function in AH to JM ROMs using these toolkits!)

The new keywords are as follows:

yr% = YEAR%[(datestamp)] Returns the year 1961..2097. If no datestamp is supplied the current year is returned
mn% = MONTH%[(datestamp)] Returns the month 1..12. If no datestamp is supplied the current month is returned
md% = DAY%[(datestamp)] Returns the day of month 1..31. If no datestamp is supplied the current day of month is returned
wd% = WEEKDAY%[(datestamp)] Returns the day of the week 0..6 (= Sunday..Saturday). If no datestamp is supplied the current day of the week is returned.
datestamp = DATE[(year, month, day, hour, minute, second)] Returns the number of seconds since January 1st 1961. If no parameters are supplied the current time in seconds is returned

The functional part of the code was pinched from the Minerva V1.98 sources, © Laurence Reeves, which are released under the GNU GENERAL PUBLIC LICENSE, Version 2, June 1991. The code was cobbled together by me, pjwitte. Any bugs found will in all likelyhood be mine.

The sources can be viewed by clicking on the links below. You can cut and paste them into an editor and alter them freely according to the license.


  1. View source of Minerva version (without DATE). Download toolkit here dateM
  2. View source of QDOS version (Replaces DATE!) Download toolkit here dateQ

HTML generated by the amazing asm2htm !
2006 Sep 30 12:17:34
Feedback on Date