[Python-Dev] dateutil (original) (raw)
Christian Tanzer tanzer at swing.co.at
Mon Mar 15 12:28:00 EST 2004
- Previous message: [Python-Dev] dateutil
- Next message: [Python-Dev] dateutil
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Why don't you use "d + relativedelta(day=-1)" instead? > > Just as easy to use, better error detection, and a big precedent.
Supporting this might be cool indeed. OTOH, it doesn't replace the current behavior. How do you get (day=30)?
I don't follow. The semantics would be similar to list indexing.
day=30
asks for the 30-est day of the month and raises an ValueError
if there isn't any. day=-1
asks for the last day of the month (and
should never raise an error ).
The allowed argument range for day
would be between 1 and n
with
n
the number of days in the month for positive values and between -1
and -n
for negative values.
-- Christian Tanzer http://www.c-tanzer.at/
- Previous message: [Python-Dev] dateutil
- Next message: [Python-Dev] dateutil
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]