[ANN] python-dateutil 0.1
niemeyer at conectiva.com
Thu Oct 9 15:27:30 CEST 2003
> >What is it?
> >The dateutil module provides powerful extensions to the standard
> >datetime module, available in Python 2.3+.
> .... is there support for business dates ie number of business days
> between two dates etc?
It will be hard to find something you can't do. :-)
How may work days until the end of the month?
>>> from dateutil.rrule import *
>>> from datetime import *
>>> now = datetime.now()
Hummm.. interesting enough, this result is not right. Today should
also be counted in this case. There's a small bug related to
micrseconds handling in the module: since the recurrence is compared
against a date without microseconds, the recurrence is not greater
than the dtstart passed. I haven't got this because all 415 testcases
were using datetime instances without microseconds. Well, we
have 417 now.. ;-)
Here is the right result, with the fix:
More information about the Python-list