[Zope3-dev] Dates and times

Guido van Rossum guido@python.org
Fri, 15 Nov 2002 16:10:45 -0500


> But I think Steve's point was that you do NOT know the date!

It's easy enough to plan *as if* you do know the date, and move the
entire event to the selected date later.

> But that is often unpractical. How do you want to represent
> something like: every Monday at 11:00 am?

That's beyond the scope of the datetime module.  Applications that
want to represent things like this can make use of the datetime
module, but I don't think the datetime module needs to have a
ready-made solution for this.

> Seriously, it is not always applicable to talk about a date in
> combination with a time. One thing you could do is to assign the
> date 01/01/0000 to your time until you know better (this also solves
> the carry bit problem). However, this seems like a hack to me.

We're acknowledging this by considering adding a "dateless time" type.

But we're pushing back on adding arithmetic for such a type, because
it's too hard to assign a meaning that everyone can agree on.

--Guido van Rossum (home page: http://www.python.org/~guido/)