From: Bryan A. Bentz
Subject: Dates (technical, not social...)
Date: 
Message-ID: <334024A1.4DCD@ai.mit.edu>
I'm looking for some uniform mechanism to represent chronological
dates, including BC, potentially different calendars, etc.  What I want
to do is to be able to enter events in these different systems, and
reconcile them on to one calendar (time line), in one system (that is,
I don't need something which will convert any date in any system to any
other system).

Before I write such a beast, might anyone out there have one?  I'd 
appreciate a direct reply, as my news server is really flaky.

Bryan Bentz
-- 


*******************************************************
Bryan A. Bentz     ·····@ai.mit.edu
URL: http://www-swiss.ai.mit.edu/~bentz/bentz.html
*******************************************************

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzEK0m8AAAEEAKJhA51TbVMslJm3xzt7ZTez4ppg29pQFfOT+U42PS2YoBcD
T28g3yY8QtCJ6+Th37gtQp/0WPWJQPcyArd1IqgP4lmljkuiXbDB5Ih6L6u1f8cU
tltlPJ9Rde2tnLvc8bj+LHc24UM/qJq5pJgMDJt7YMA8nvsyeGBL/wmQDJ1tAAUR
tCFCcnlhbiBBLiBCZW50eiA8YmVudHpAYWkubWl0LmVkdT4=
=CHv4
-----END PGP PUBLIC KEY BLOCK-----

From: Erik Naggum
Subject: Re: Dates (technical, not social...)
Date: 
Message-ID: <3068834505595900@naggum.no>
* Bryan A. Bentz
| I'm looking for some uniform mechanism to represent chronological dates,
| including BC, potentially different calendars, etc.  What I want to do is
| to be able to enter events in these different systems, and reconcile them
| on to one calendar (time line), in one system (that is, I don't need
| something which will convert any date in any system to any other system).
| 
| Before I write such a beast, might anyone out there have one?  I'd
| appreciate a direct reply, as my news server is really flaky.

the Julian Date or Modified Julian Date system might be useful.  JD counts
in (fractional) days since some epoch a god-awful long way into the past.
JD and MJD are used by astronomers.

#\Erik
-- 
I'm no longer young enough to know everything.
From: Stephen Adams
Subject: Re: Dates (technical, not social...)
Date: 
Message-ID: <sahohbzn0kd.fsf@yaroslav.ai.mit.edu>
"Bryan A. Bentz" <·····@ai.mit.edu> writes:

> I'm looking for some uniform mechanism to represent chronological
> dates, including BC, potentially different calendars, etc.  What I want
> to do is to be able to enter events in these different systems, and
> reconcile them on to one calendar (time line), in one system (that is,
> I don't need something which will convert any date in any system to any
> other system).
> 
> Before I write such a beast, might anyone out there have one?  I'd 
> appreciate a direct reply, as my news server is really flaky.
> 
> Bryan Bentz

Bryan, you certainly should not re-invent this wheel.

There was a paper in `Software -- Practice and Experience' a few years
ago.  The authors discussed the problem at length and used Scheme code
as an expository vehicle.  I know I have seen the code translated into
Common Lisp too.

A quick AltaVista search gives:


http://emr.cs.uiuc.edu:80/~reingold/calendars.html
________________________________________________________________________
Edward M. Reingold's Calendar Book, Papers, and Code

Calendrical Calculations 
    By Nachum Dershowitz and Edward M. Reingold. 
    Cambridge University Press, 1997.

    A unified, algorithmic presentation is given for the Gregorian (current civil), ISO, Julian
    (old civil), Islamic (Moslem), Hebrew (Jewish), Persian, Coptic, Ethiopic, Bahai, Mayan,
    French Revolutionary, Chinese, and Hindu calendars. Easy conversion among these
    calendars is a byproduct of the approach, as is the determination of secular and religious
    holidays. Calculations of lunar phases, solstices, equinoxes, sunrise, and sunset are
    described as well. 



The following material is now way out of date, having been superceded by the book above. 

Calendrical Calculations 
    By Nachum Dershowitz and Edward M. Reingold. 
    Software-Practice and Experience 20 (1990), 899-928.

    A unified, algorithmic presentation is given for the Gregorian (current civil), ISO, Julian
    (old civil), Islamic (Moslem), and Hebrew (Jewish) calendars. Easy conversion among
    these calendars is a byproduct of the approach, as is the determination of secular and
    religious holidays. (PostScript; 30 pages) 

Calendrical Calculations, II: Three Historical Calendars 
    By Edward M. Reingold, Nachum Dershowitz, and Stewart M. Clamen. 
    Software-Practice and Experience 23 (1993), 383-404.

    Algorithmic presentations are given for three calendars of historical interest, the Mayan,
    French Revolutionary, and Old Hindu. (PostScript; 22 pages) 

Common Lisp code from above calendar papers 

C++ code for most of the Lisp code in the first paper 

The GNU Emacs Implementation of the Calendar