[Zope3-dev] DateTime, zones, and arithmetic
Hannu Krosing
hannu@tm.ee
12 Mar 2002 20:57:40 +0200
On Tue, 2002-03-12 at 17:20, Phillip J. Eby wrote:
>
> One of the nice things about a mutable datetime, however, is that it makes
> certain kinds of calendar operations trivial. For example::
>
> someDate = datetime() # default to today
> someDate.day = 1 # first of this month
It would be awfully nice and pythonic to be able to do
someDate.day = -1
and get last of this month, especially if it can be done in a way that
makes a consequtive
someDate.month += 1
return last of next month
-------------
Hannu