LSL Calendar Traits

Purpose

This page is a guide to some traits written in the Larch Shared Language (LSL). It contains traits which you may find helpful when dealing with calendar dates. These are freely available, both through this page, an alphabetical index, and by anonymous ftp from ftp.cs.iastate.edu in file pub/larch/Calendar/calendar-traits.tar.gz. (The README file contains similar information to this page.)

This collection of traits constitutes a small LSL handbook. (Other handbooks are also available.) Contributions are welcome for extending and enhancing it.

Overview of the traits

Raw Dates

The trait RawDates just defines a tuple of abstract values and the appropriate order for calendar dates. It should be the most useful trait as it applies to many different calendars.

Western Calendar

It turns out that there are many different calendars that have been (historically) in use. The common Western calendar months are in the trait WesternMonth.

In the Western calendar there are also variations. The basics are described in the trait JulianGregorian.

The trait JulianGregorian depends on two dates, which tell when the switch was made from the Julian to the Gregorian calendar. The dependencies are described in the trait GregorianAssumptions.

Unfortunately, the switch from the Julian to the Gregorian calendar took place in different years in different countries. (An additional complication is that some parts of the world are now in different countries than they were...) If you don't care about dates before (say) 1950, then you can probably use any of the following traits, which are listed with the places for which they are valid.

Contributions Sought

Traits are needed for the Jewish, Islamic, Chinese, etc. calendars. Also needed are traits for when the Gregorian calendar was adopted in other parts of the world. See your name (clickable) here! Enjoy untold fame and publicity!

Also appreciated would be implications for these traits, and corrections or suggestions based on debugging or use.

Corrections and contributed traits can be first sent to leavens@cs-DOT-iastate-DOT-edu (replace the -DOT- with .) or to the newsgroup comp.specification.larch. After getting feedback, your contributions can be added to the archive.

The only condition on contributions is that you be willing to offer your traits freely to others, and be willing to maintain it (correct mistakes.) Your name and email address must appear in the file.

Acknowledgements

Thanks to John Penix for his lsl2html tool.

This work was supported in part by NSF grant CCR-9593168.


Gary T. Leavens