Date/Time range was Re: [Fwd: [Zope3-dev] Date/Time requirements]

Tim Peters tim@zope.com
Thu, 14 Mar 2002 02:11:30 -0500


[Gary Poster]
> heh.  actually, there was a question somewhere back in this thread if
> this were a "general call for date/time type requirements"--

Guido's msg was, yes.  My msg was specifically asking for concrete time zone
and daylight savings time use cases.  So far we got one.

> to which the answer was yes.  so, I was trying to be pertinent; sorry
> if I failed. ;-)  Thanks for your response anyway.

Had you not tried to sell your list as "time zone use cases", I would have
been much more cheerful about it <wink>.

> Eh--from http://www.lemburg.com/files/python/mxDateTime.html it looks
> like only from 0 CE on is supported,

Do read it again.  "days in the Gregorian calendar since the day before
January 1 in the year 1" can be negative, as is explicitly stated a few
lines later:

    Dates before the Epoch are handled by extrapolating the calendars
    using negative years as basis (the year 1 BCE corresponds to the
    year 0, 2 BCE is represented as year -1 and so on).

Marc-Andre supports this already, out of the box.  If you read between the
lines, mxDateTime was influenced by astronomers early in its life, and so it
supports everything they customarily need (including negative years,
nanosecond resolution, and fast time arithmetic at the expense of slow I/O
conversion); it also has no-to-minimal support for what they don't need,
like timezones and daylight savings time.

[on PGDOs]
> that sounds extremely cool, actually...  I wish, then, that you went
> far enough back to make it useful for me too, but...

Well, it's widely rumored that Guido has a time machine, and he's only
traveled to the cave art era a few times.  This explains the primitive
drawings of Pythons and, umm, Zopes, so prevalent in prehistoric times.

> ...
> I understood this to be a call for date/time wishes, and this was mine.
> Not all wishes are granted.

Guido's was a general call, and he'll factor your wishes in.  Recording them
on the wiki was a right thing to do.  I just have a decade's practice
channeling him, and like Cassandra I'm fated to pass out disappointing
predictions early and often.

> That said, I'm a bit confused as to what you mean by the "other
> things" I want.  oh--you mean the variable precision?

In large part, yes -- that's quite a can of worms, combining the best
features of times so early no two experts agree on what to call them, with
the joy of floating-point varying precision <wink>.  The rest was that you
also want that this class "decided on a solution to the B.C.E. (B.C.)
problem" (there's more than one in common use, and Guido doesn't want to
argue their merits), or indeed even debate whether it's good enough to cut
time off in the negative direction before reaching cave art times (you say
yes, someone else will say no).

> ...
> eh.  I'm mostly a shy bird.  I'll go back to my nest and ponder my own
> solution when the time comes, or eventually emerge again and pester the
> mxDateTime maintainers. :-)

You express yourself too clearly to remain a shy bird, Gary!  I hope we hear
more from you.  Just on a topic that won't make Guido squirm <wink>.