[comp.edu] Interesting calendars

ken@aiva.ed.ac.uk (Ken Johnson) (01/26/89)

One of the exercises I set my Prolog students is to write a program that
given any date in the current year computes the day on which it fell,
e.g.  this year

	?- day(1,january,sunday).

is true.  (See note 1 below for Prolog people).  To make a supplementary
exercise I would be interested to know about any other calendars
interestingly different from our own (the Gregorian, I think).  Can
anyone email me about, say, the Muslim calendar or the French decimal
calendar of 1789?


1.  Mode of day/3 is day(+,+,?).  It is an interesting exercise to write
    it in mode day(?,?,?) so it will backtrack through all the Mondays or
    whatever, but I can't be bothered!!

-- 
==============================================================================
From:       Ken Johnson
Address:    AI Applications Institute, The University, EDINBURGH, Scotland
Phone:      031-225 4464 ext 212
Email:	    k.johnson@ed.ac.uk
Quotation:  I've had a rotten day at work so far. My best friend didn't come.

dik@cwi.nl (Dik T. Winter) (01/28/89)

In article <757@aiva.ed.ac.uk> ken@aiai.ed.ac.uk (Ken Johnson) writes:
 > 
 > One of the exercises I set my Prolog students is to write a program that
 > given any date in the current year computes the day on which it fell,
 > e.g.  this year
 > 
 > 	?- day(1,january,sunday).
 > 
 > is true.  (See note 1 below for Prolog people).  To make a supplementary
 > exercise I would be interested to know about any other calendars
 > interestingly different from our own (the Gregorian, I think).  Can
 > anyone email me about, say, the Muslim calendar or the French decimal
 > calendar of 1789?
 > 
What the heck.  Yes, I have such a program, although it is not polished
in any means.  It knows of some 60 different calendars and converts from
one to the other.  It is essentially without documentation.  If you are
(or anybody is) interested, send me mail.  It is in pascal for the CDC
Cyber series (including machine code), but I am in the process of
converting it to C.  So if you can wait; wait; (but don't hold your breath).
-- 
dik t. winter, cwi, amsterdam, nederland
INTERNET   : dik@cwi.nl
BITNET/EARN: dik@mcvax