DAY OF WEEK/CALENDAR (16K ZX-81)
by Ken Chua
from Home Computing Weekly 43 (3-9 January 1984), pages 40-41

Give you the time of day? With Ken Chua's program, your 16K ZX81 will do better
than that. It'll tell you the day of the week and give you a monthly - or
yearly - calender.

This program will print a calendar month by month, or tell you the day of week
of any date you ask.

It starts with a menu and you have three options.

Option 1 will ask you for the full date and tell you the day of week for that
date.

If you enter CONT after it stops, it will proceed to print the calendar of th
month on screen (option 2).

Atfer option 2, CONT will send it into printing the whole year calendar on
printer (option 3).

To avoid all these, always RUN. In option 2, you can have a hard copy of the
calendar by pressing COPY.


HOW IT WORKS

10      store for information on day of week of the day before the first day
of each month
20      names of week days
30      names of months
40      parameters for the 12 months, used in the calculations of W()
50-80   menu
90-150  a way of using INKEY$
160-210 prompting for date (option 1)
220-260 prompting for month (option 2)
270-280 prompting for year (option 3)
290-310 to detect leap year
320-360 to work out the day of week of the first day of year
370-410 store the values of W()
420     jump if it is not option 1
430-440 work out day of week of the date
450-460 print answer for option 1
490     number of days in each month
500     leap year
510     the 31 days
520     14 spaces
530     jump if it is option 3
540     day of week for first day of month
550     Sunday
560     number of days in the month
570     string for printing the days at correct positions
580     columns required for printing the days
590     printing month and year
610-670 print calendar of the month
690-860 print the year calendar on printer