LAUNCHPAD CALENDAR

This is the Calendar and mini-diary supplied with the
Launchpad suite. Calendar itself is freeware and may be
freely distributed for all QLers, although I retain the
copyright. Launchpad Calendar is Copyright  2003 Dilwyn
Jones.

It provides a monthly calendar display for all years from
1582 (although Britain and America only adopted the current
calendar system in 1752) to 4902, by which time the current
calendar system will have accrued a day's error and probably
be rendered useless. Come back and see me about it then if
this is a problem...

The calendar obviously takes care of calculating leap years,
not just every four years but takes the turn of century into
account too, i.e. if the turn of a century, the year number
must be divisible by 400 to be a leap year, thus 2000 and
2004 are leap years, but 1900 and 2100 aren't leap years. The
calendar uses the Zeller's Congruence method of calculation -
for more information about this see the Clocking In series in
QL Today magazine, volume 6 issue 5 to volume 7 issue 1.

In addition, short notes may be appended to each day of the
year (up to 8 x 30 character lines of text) by clicking on
the date in the calendar display. These notes are held in a
file called DIARY_DAT in a directory whose name is configured
into the Calendar program (configure a blank name if you do
not want the diary function).

Configuration.

Execute the Config or MenuConfig programs and configure
calendar_obj. First, it asks for the language used for the
calendar display:

0-English
1-Welsh
2-Gaelic (Irish)
3-French
4-German
5-Dutch
6-Spanish
7-Italian
8-Portuguese

The language option applies only to the day and month names.

Secondly, enter the name of the drive and directory holding
the DIARY_DAT file. Leave this blank if you only want the
program to work as a simple calendar.

Using The Program

+-------------------------------------------------+
| [Move] [Zzz] [Flag]  [ CALENDAR ]     [(C)] [X] |
|                                                 |
| <<   <       [   SEPTEMBER 2003  ]        >  >> |
|                                                 |
|  SUN    MON    TUE    WED    THU    FRI    SAT  |
|                                                 |
|          1      2      3      4      5      6   |
|   7      8      9     10     11     12     13   |
|  14     15     16     17     18     19     20   |
|  21     22     23     24     25     26     27   |
|  28     29     30                               |
+-------------------------------------------------+

The usual system control icons are across the top:

[Move] Move the program display around the screen
[Zzz]  Put Calendar to sleep in the QPAC2 button frame
[Flag] Select Calendar language by clicking on flag symbol
[(C)]  Display a short copyright notice
[X]    Exit from the program (ESC)

The symbols to the left and right of the current month
display are the navigation buttons for going backward or
forward by a month or year:

<< back one year (use comma on keyboard)
<  back one month (use < on keyboard)
>  forward one month (use > on keyboard)
>> forward one year (use . on keyboard)

The program will go back from January to December of the
previous year if required, or vice versa.

If you configured Calendar to work as a simple diary,
clicking on the date number (1 to 30 in the example diagram
for September 2003 above) will bring up the diary notepad for
that day. Each day has its own short note facility - up to 8
lines of 30 characters (240 characters maximum). The editor
is a primitive line editor but should suffice for the very
simple purpose of this program.

+-----------------------------------+
| [Move]  [   1 September   ]  [OK] |
|                                   |
|     Edit       Clear       OK     |
|                                   |
| +-------------------------------+ |
| |                               | |
| |                               | |
| |                               | |
| |                               | |
| |                               | |
| |                               | |
| |                               | |
| |                               | |
| +-------------------------------+ |
+-----------------------------------+

The current entry for the selected date is shown, if there is
one, in the main window at the bottom. Hit or Do (left or
right mouse click or SPACE or ENTER respectively) on Edit to
tyoe in a new entry for this date or amend the existing one.
Note that it uses a simple line editor with no word wrap or
anything like that - any justification has to be done
manually, it's only meant for simple notes after all, like
"Aunt Jean's birthday today" or "Quanta Workshop In London
Today".

To clear the entire entry, Hit or Do on the Clear command.
There is no confirmation and the entry cannot be recovered
afterward so USE WITH CAUTION!

Hit either the OK or ESC [X] icons to exit from this screen.
If you made any changes, they are automatically written out
to the DIARY_DAT file.

Note that there is only one DIARY_DAT file. There is no
separate file for each year - it is a simple diary facility
designed for recurring dates such as birthdays, and assumes
that (like paper diaries) you only need a diary for one year
at a time!

Clearing The Entire Diary

To prevent accidental erasure of the entire diary, there is
no facility to clear it all from within the program, only
single days may be cleared. There are two ways to create a
new blank DIARY_DAT file.

1. Delete DIARY_DAT. This will force Calendar to create a new
blank one next time you edit a day's entry. If it can't find
the DIARY_DAT it will ask if you wish to create a new one.
Enter Y for Yes when asked, then edit a day's diary entry and
it will save the new diary file.

2. From SuperBASIC, run the following program:

100 OPEN_NEW #3,FLP1_DIARY_DAT
110 PRINT #3,'LPC1';
120 t$ = ''
130 FOR a = 1 TO 366 : PUT #3,t$
140 CLOSE #3

Format Of Diary_Dat

(Included for my own information when testing!)

4 bytes - 'LPC1' (LaunchPad Calendar 1)
366 strings in internal format, each up to 240 characters
long (i.e. word for string length, followed by text of
string, no linefeed after each string). The entry for
February 29th exists whether a leap year or not - it is
ignored when not a leap year.

Maximum DIARY_DAT file length:88576 bytes (4+(366*(2+240)))

Release History

v1.00     29/9/03   First release version.

