[Zope3-dev] Dates and times
Tim Peters
tim@zope.com
Fri, 15 Nov 2002 15:34:39 -0500
[Stephan Richter]
> But I think Steve's point was that you do NOT know the date!
Unless making houmous is a purely abstract concept, at any time he actually
wants to *make* humous he can apply the steps I spelled out to the specific
date he has in mind: attach his time object to a specific datetime object,
then add two timedeltas to the result of that, one at a time. The sequence
[time_object, timedelta_1, timedelta_2]
represents "the schedule" in a date-independent way, and can be reused as
often as he cares to make houmous.
> ...
> But that is often unpractical. How do you want to represent
> something like: every Monday at 11:00 am?
Seems a different issue, unless you're arguing that "a time object" must
contain day-of-week (& if so, why not also second Tuesday of each month, or
last Thursday of each November, etc?) and recurrence information too. That
goes far beyond anything suggested in the msg that started this thread:
A separate 'time of day' class would be different from timedelta
in that it is "anchored" to to the beginning of a day (not a
specific day, but any day)
> Seriously, it is not always applicable to talk about a date in
> combination with a time.
I believe the OP would agree with that. The time object orginally suggested
has nothing to do with a date until you explicitly attach it to a date.