[Zope3-dev] Dates and times

Christian Zagrodnick cz@gocept.com
Tue, 19 Nov 2002 15:34:16 +0100


date says this:

% date -d '2000-01-31 + 1 month'
Thu Mar  2 00:00:00 CET 2000



On Fri, Nov 15, 2002 at 01:05:17PM -0500, Tim Peters wrote:
> [Marius Gedminas]
> > ...
> > BTW, regarding INTERVALs: PostgreSQL allows one to specify a number of
> > months in an interval, and expressions like date 'YYYY-MM-DD' + interval
> > '1 month' return the same DD on the next month.
> 
> What's the value of
> 
>     2000-01-31 + 1 month
> 
> ?  The last day of February?  If so, is
> 
>     (2000-01-31 + 1 month) - 1 month
> 
> then 2000-01-29?

-- 
Christian Zagrodnick

gocept gmbh & co. kg - schalaunische strasse 6 - 06366 koethen/anhalt
fon. +49 3496 3099114 - fax. +49 3496 3099118 - mob. +49 179  1463644