dateutil

using existing rrule to generate a further set of occurrences

I have an rrule instance e.g. r = rrule(WEEKLY, byweekday=SA, count=10, dtstart=parse('20081001')) where dtstart and byweekday may change. If I then want to generate the ten dates that follow on from this rrule, what's the best way of doing it? Can I assign a new value to the _dtstart member of r? That seems to work but I'm not ...

dateutil.rrule.rrule.between() gives only dates after now

Hi! from ipython console: In [16]: b Out[16]: datetime.datetime(2008, 3, 1, 0, 0) In [17]: e Out[17]: datetime.datetime(2010, 5, 2, 0, 0) In [18]: rrule(MONTHLY).between(b, e, inc=True) Out[18]: [datetime.datetime(2009, 3, 6, 14, 42, 1), datetime.datetime(2009, 4, 6, 14, 42, 1), datetime.datetime(2009, 5, 6, 14, 42, 1), datetime.da...

How to install python-dateutil on Windows?

I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo classes. No problem, a quick search turns up python-dateutil which should do exactly what I need. The problem is that I need to install it ...

Python dateutil.rrule is incredibly slow

I'm using the python dateutil module for a calendaring application which supports repeating events. I really like the ability to parse ical rrules using the rrulestr() function. Also, using rrule.between() to get dates within a given interval is very fast. However, as soon as I try doing any other operations (ie: list slices, before()...

"Passing Go" in a (python) date range

Updated to remove extraneous text and ambiguity. The Rules: An employee accrues 8 hours of Paid Time Off on the day after each quarter. Quarters, specifically being: Jan 1 - Mar 31 Apr 1 - Jun 30 Jul 1 - Sep 30 Oct 1 - Dec 31 The Problem Using python, I need to define the guts of the following function: def acrued_hours_betw...