Mailing List Archive

ANNOUNCE normalDate 0.7
Hi folks.

I don't keep a list of people who use NormalDate, a simple
Python date class, but Dan Winkler reminded me today that
I neglected to put in __add__, __sub__ methods. For anyone
using it, the latest version is available:

http://starship.python.net/crew/jbauer/normalDate/

From the docstring:

NormalDate is a specialized class to handle dates without
all the excess baggage (time zones, daylight savings, leap
seconds, etc.) of other date structures. The minimalist
strategy greatly simplifies its implementation and use.

Internally, NormalDate is stored as an integer with values
in a discontinuous range of -99990101 to 99991231. The
integer value is used principally for storage and to simplify
the user interface. Internal calculations are performed by
a scalar based on Jan 1, 1900.

For people who are serious about their date calculations, I'd
recommend Marc-Andre Lemburg's mxDateTime:

http://starship.python.net/crew/lemburg/mxExtensions.html

For people who aren't so serious about their date calculations,
check out:

http://www.pauahtun.org

The Python distribution also includes a date class, which would
have saved me time, had I bothered to check.

Demo/classes/Dates.py

---
Jeff Bauer
Rubicon Research
ANNOUNCE normalDate 0.7 [ In reply to ]
[Jeff Bauer]
> ...
> http://starship.python.net/crew/jbauer/normalDate/
> ...

Jeff, that URL didn't work for me. This one did:

http://starship.python.net/crew/jbauer/normaldate/

I think the server is case-sensitive.

> ...
> The Python distribution also includes a date class, which would
> have saved me time, had I bothered to check.
>
> Demo/classes/Dates.py

As the author of Dates.py, let me recommend Jeff's NormalDate.py. Dates.py
was written as a test drive of then-new operator overloading facilities, not
as a real date class (that's why it's under the Demo tree). Jeff's has more
features and is more practical, but is also very small and isn't bogged down
with esoterica either. OTOH, his does have a Y10K problem, while mine works
until the year gets so big it won't fit in an unbounded Python long, and
even then you'll get a butt-saving MemoryError <wink>.

use-dates.py-if-you're-immortal-ly y'rs - tim
ANNOUNCE normalDate 0.7 [ In reply to ]
Tim Peters wrote:
> OTOH, his does have a Y10K problem, while mine works
> until the year gets so big it won't fit in an unbounded
> Python long, and even then you'll get a butt-saving
> MemoryError <wink>.
>
> use-dates.py-if-you're-immortal-ly y'rs - tim

By then we'll all be speaking Mayan anyway, because the only
thing left to communicate with will be rocks.

-Jeff