Short: WB Calender/World Clock with 4 clock faces Author: mike@mikech.demon.co.uk Uploader: mike mikech demon co uk Type: util/wb Architecture: m68k-amigaos Version 1.3 - minor bug fix Version 1.0 - Initial release Version 1.1 - Added automatic update of today indicator in calendar at turn of midnight. Version 1.2 - Added update of month & year gadgets at turn of midnight. Doh! Version 1.3 - Fixed bug in GMT display which caused values like 24:10 etc. to display in some time zones. Note: There is a bug in Blitz Basic's date handling, it insists that January 1st 2001 is in fact December 32nd 2000! This means ClockCal will not show the correct date on that day. On January 2nd everything works normally again. I have included a reminder of this in the eventlist in this archive. 1. INTRODUCTION ClockCal opens a window on your WB containing up to four analogue clock faces which can be configured to show the current time in different world locations, with or without Daylight Saving Time in force, plus a calendar for the current (or any other) month. Gadgets exist to toggle the display between just the clocks, just the calendar or both. Events may be noted for particular dates and those days will be highlighted in the calendar. The window sizing takes account of the title bar height so should work irrespective of your system font, and safe guards exist to prevent the window failing to open because part of it is off screen etc. (since the window changes size depending on how many clocks you have active and whether the calendar is on). I wrote this programme for my own use and do not anticipate further development. It is Freeware. If you find it useful complements are always welcome! 2. INSTALLATION None required. Copy the directory wherever you want it. 3. USAGE Double click the ClockCal icon. The window will open in the same state as last time you closed it, in the same position on the screen. 3.1 CONFIGURING THE CLOCKS The Clocks.. gadget opens a new window containing a set of gadgets for each of the four possible clocks. It is essential that Clock 1 is set to show your local (system) time, but with the correct time zone difference and DST setting, as this clock is used to calculate GMT, which in turn is used to calculate all the other clocks. Clock 1 need not be on, but it must be set right. Clocks with a tick in the ON checkbox will be displayed in the window. When the DST checkbox is ticked the clock will have the DST value (usually 1 hour) added to it. Note the timezone is set using a GMT +/- cycle gadget and a number of hours and minutes - do not put a sign in the time difference box. Close the window for the new settings to take effect. 3.2 USING THE CALENDAR The month displayed by the calendar always starts off as the current month. The cycle gadget enables you to view different months (remember that the Shift key makes this cycle backwards!). Going from December to January or January to December will also change the year, but any year may be viewed by typing a different year in to the year gadget. The two tiny buttons beside the year gadget provide a convenient way of shifting the year up or down by one. Note that events will not be highlighted for years before 1978. I do not believe the calendar is reliable for extreme dates but should be OK for the next 40 years or so at least. (It shows 1900 and 2100 as leap years - which they are not - although 2000 is, and that is correctly displayed (The full rule for leap years is: Years exactly divisible by 4 are leap years EXCEPT centenary years, but in the case of millennial centenaries like 1000 or 2000 they ARE leap years - I think!)). Clicking on a day will open the notes window, which lists events noted for that date. Up to 20 one-line notes can be entered for a given date. Use the mouse to highlight any existing note or an empty line. The text for the note can be entered in the text gadget. The "Annual" checkbox should be ticked for events like birthdays which happen every year, and left clear for events like appointments which relate to a specific date. These two different kinds of events are highlighted in different colours on the calendar (appointments taking precedence over birthdays where both occur on the same day). You may also set a number of days in the "Warning" gadget, which will put up a reminder when the programme is started. Use 0 for no reminder. After setting these gadgets, use the SET button to set the note. To delete a note, select it with the mouse and press DELETE. In either case the changes will not be made permanent until you exit the window with the OK gadget. The CANCEL gadget will discard the changes. The "Purge old events" checkbox causes old events to be removed from the eventlist, but obviously those marked "annual" will not be removed. Events are only removed when new notes are set or deleted, but there is one exception to this - when you check the purge checkbox for the first time, or uncheck it and check it again, old events will be deleted there and then. Thereafter they will only be removed when some other change is made to the eventlist. Note that the purge checkbox is NOT associated with a particular date or a particular note. The "List All" gadget lists the actual text file which stores the events, using an external text viewer. The default is C:More, but you may change this in the fconfig file (see below). The three slim buttons across the bottom of the window have the following functions: the leftmost resets the calendar to the current month and year. The middle one is the "only show calendar" button, which will hide the clocks. If the clocks are already hidden, however, they will be restored by this button. Similarly the rightmost button is the "only show clocks" gadget which will hide or restore the calendar. If only the clocks or only the calendar are visible, you can toggle between them by pressing the appropriate button (if clocks are visible the "only show calendar" button will switch to the calendar, and then the "only show clocks" button will take you back to the clocks). 4. OTHER CONFIGURATION OPTIONS 4.1 fconfig file This is a simple text file which should be in the same directory as the executable. You can use it to set the fonts and colours used, and also the text viewer invoked to list all events. You can also change the file names and locations for the eventlist and prefs files. The file that is included with the archive has all the possible options set. Internal defaults exist in the executable for any which are missing from this file or if this file itself is missing. See fconfig itself for more information. The two fonts which can be set are for the gadget text and the clock and calendar text. The latter (set in fconfig as, say _8X8_FONT=p0t-noodle.font) must be a fixed 8x8 font. The colours are the first and last four from the WB palette and should remain correct regardless of your screen depth. Which are used for each part of the display may be changed in fconfig (rather laboriously, I admit). 4.2 lconfig file The lconfig file contains all the text strings used in the programme. If it is not present then the internal English defaults will be used, however, by changing the strings in this file it is possible to localise the programme for other languages. Care must be taken that the strings are entered in the same fixed order, and that they consist of approximately the same number of characters. The strings for days and months must have spaces (for the days) and | dividers (for the months) as in the English version. See lconfig for more details. 5. TECHNICAL NOTES Most of the time the programme sits idle, only checking for input every quarter of a second. This means there may be a slight delay when you first hit a gadget. As soon as a gadget is hit however, the programme checks continuously for input, until a full minute passes with no user-action, when it goes back to its standby state. 6. OTHER INFO Author: Mike Child mike@mikech.demon.co.uk Tools used: Blitz Basic 2.1 Written on: A1200 Apollo060@66 32MB WB3.0 Thanks to the subscribers to BlitzList (blitz- list@netsoc.ucd.ie) for solving some queries. 7. HISTORY Version 1.0 - Initial release Version 1.1 - Added automatic update of today indicator in calendar at turn of midnight. Version 1.2 - Added update of month & year gadgets at turn of midnight. Doh! Version 1.3 - Fixed bug in GMT display which caused values like 24:10 etc. to display in some time zones.