Date-Time type (was Re: [DB-SIG] DB-API Spec. 1.1a1)

Hannu Krosing hannu@trust.ee
Mon, 08 Dec 1997 19:47:38 +0200


Christian Egli wrote:

> >>>>> "Marc" == M -A Lemburg <lemburg@uni-duesseldorf.de> writes:
>
>   Marc> As Bill and Jim already pointed out, the current date/time
>   Marc> handling in Python is fine when all you care about is a range
>   Marc> from 1970 to 2038, but as soon as you want to handle dates
>   Marc> beyond that range, you get into trouble.
>
>   Marc> BTW: I'm working on a prototype for a such date type in
>   Marc> Python.  I'm not yet sure, but it seems that actually two
>   Marc> types will emerge from it: one for fixed points in time and
>   Marc> one to express time deltas.
>
> I can't hold myself back any longer:

Good !

> Edward M. Reingold has written some fine functions relating to
> calendars which are included in the Emacs distribution. This code has
> been translated by himself to C++ and can be found under
> http://emr.cs.uiuc.edu/~reingold/papers/calendar/calendar.C. I tried
> to swig this code but had troubles with overloaded operators. But it
> was pretty straightforward to translate it into Python.
>
> Only a few of the requirements for a Date-Time type that Jim Fulton
> once stated in the db-sig are actually supported and obviously it is
> not implemented in C. But maybe some of this code could be scavenged
> for a C implementation or somebody manages to swig the above C++ code.
>
> This code is released as is. "It works for me". I don't claim it to be
> complete. Nor do I claim that it is the answer (or even an answer) to
> the current discussion in the db-sig. See also the TODO section in the
> code.
>
> ----------------cut here--------------------------------------------------------

As it is a very nice module indeed and might be used by several people ;), we should agree what to call
this module (I would propose WorldDates.py, unless it already has some nice name),

Under 1.5 hierarchy different calendars could of course be split into separate submodules under Date.

> #!/bin/env python
>

Hannu Krosing


_______________
DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org
_______________