Generated: December 12, 2003, 17:53:46Copyright ©2003, Kurt NørmarkThe local LAML software home page

Reference Manual of the LAML Calendar Facility

Kurt Nørmark ©    normark@cs.auc.dk    Department of Computer Science    Aalborg University    Denmark    

Source file: tools/calendar/calendar.scm
LAML Version 23.00 (December 12, 2003, full)

This is a tool for generation of calendars, which can be shown in an Internet Browser. This tool relies on the very old HTML ad hoc stuff, and as such it is obsolete by now. Please use tools/calendar/xml-in-laml/calendar.scm instead.

The main function is calendar. Besides this function, it is important to understand the input format of appointments in the calendar. Also, there are a number of constants, which affect the appearance of the calendar.

This tools requires input (appointments). The tool assumes that the calendar input is the Scheme variabel calendar-events. In other words, you must define this variable. Below, we explain the format of calendar-events.

This tools requires the libraries general, cgi, html, encode-decode, hex, and time. They are not loaded by the tool itself.

Table of Contents:
1. About the format of calendar input.3. Calendar parameters.
2. Event selection functions.4. The main calendar function.

Alphabetic index:
calendar(calendar year from-month number-of-months . show-today)Return a HTML calendar for year, from-months, and running through number-of-months.
calendar-background-colorcalendar-background-colorThe background color of the calendar.
calendar-font-sizecalendar-font-sizeThe calendar font size.
event-brief-text(event-brief-text e)Return the brief textual description of a calendar appointment.
event-color(event-color e)Return the color of a calendar appointment.
event-end-time(event-end-time e)Return the end time of a calendar appointment.
event-long-text(event-long-text e)Return the long textual description of a calendar appointment.
event-start-time(event-start-time e)Return the start time of a calendar appointment.
event-url(event-url e)Return the url of a calendar appointment.
month-widthmonth-widthThe width of a month.
week-separator-of-calendarweek-separator-of-calendarWeek separators: Whether thin og thick (symbols).

 

1.   ABOUT THE FORMAT OF CALENDAR INPUT.
The calendar input must be present in a variable named calendar-events. calendar-events must be defined externally to the calendar tool. Calendar-events is a list of appointments. A single appointment is, in turn, a list. Thus calendar-events is a list of lists.

The detailed format of an appointment is the following:

   (start-time end-time brief-description long-description color url) 
Start-time and end-time are integers (a number of seconds since january 1, 1970). The function time-encoding from the time library is useful for construction of these numbers.

Brief-description is a string, the contents of which goes into the calendar. Long-description is a longer description of the event. Currently, this information is not used.

Color is a RGB color list (a list of three integers). You can use the color constans of the html Scheme library, if you want to.

Finally, url is the url, to which we link from the calendar entry. If it is the empty string, no link will be made.


 

2.   EVENT SELECTION FUNCTIONS.
The event selector functions define accessors into a calendar appointment.


event-start-time


Form
(event-start-time e)

Description
Return the start time of a calendar appointment.


event-end-time


Form
(event-end-time e)

Description
Return the end time of a calendar appointment.


event-brief-text


Form
(event-brief-text e)

Description
Return the brief textual description of a calendar appointment.


event-long-text


Form
(event-long-text e)

Description
Return the long textual description of a calendar appointment.


event-color


Form
(event-color e)

Description
Return the color of a calendar appointment.


event-url


Form
(event-url e)

Description
Return the url of a calendar appointment.


 

3.   CALENDAR PARAMETERS.
In this section we find a number of variables which control the calendar appearance.


calendar-font-size


Form
calendar-font-size

Description
The calendar font size. Default value is 1.


week-separator-of-calendar


Form
week-separator-of-calendar

Description
Week separators: Whether thin og thick (symbols).


month-width


Form
month-width

Description
The width of a month. Default value is 150.


calendar-background-color


Form
calendar-background-color

Description
The background color of the calendar. A RGB list. Default is white.


 

4.   THE MAIN CALENDAR FUNCTION.
In this section we find the most important function at all, the calendar function which generates a calendar.


calendar


Form
(calendar year from-month number-of-months . show-today)

Description
Return a HTML calendar for year, from-months, and running through number-of-months. This is the absolute main function of the tool. As an example, (calendar 1999 2 3) will produce a calendar of February, March, and April in 1999. If the optional parameter show-today is #t, the current date is shown in red.

Preconditions
The variable calendar-events must be defined prior to the call of this function

See also
calendar eventsSECTION1    


Generated: December 12, 2003, 17:53:46
This documentation has been extracted automatically from the Scheme source file by means of the Schemedoc tool