A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043157.html below:

[Python-Dev] dateutil

[Python-Dev] dateutilNick Coghlan ncoghlan at iinet.net.au
Mon Mar 15 23:48:24 EST 2004
Gustavo Niemeyer wrote:

>>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)?

day=30 is simply '30th day of the month'.

day=-2 is '2nd last day of the month'.

The negative simply means 'count from the end', as it does with Python 
indexing. This would indeed be useful, and far more obvious than 
'day=31' and relying on the 'use maximum day in month' feature.


The other question I had was why is there no absolute 'week' parameter? 
to get 'week 43', it is necessary to say 'month=1, day=1, weeks=43'.

Regards,
Nick.

-- 
Nick Coghlan               |     Brisbane, Australia
Email: ncoghlan at email.com  | Mobile: +61 409 573 268

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4