dateutil.relativedelta.WE and friends?

2013-11-11 Thread Skip Montanaro
I found a rather inscrutable use of dateutil recurrence rules in
StackOverflow which generates a series of dates corresponding to the
third Wednesday of the  month:

import dateutil.rrule as dr
import dateutil.relativedelta as drel

dt = datetime.datetime(2012, 1, 1, 0, 0)
rule = dr.rrule(dr.MONTHLY, byweekday=drel.WE(3), dtstart=dt, count=12)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: dateutil.relativedelta.WE and friends?

2013-11-11 Thread Skip Montanaro
damn gmail. Please ignore the drivel below (and this top post)...

Skip

On Mon, Nov 11, 2013 at 2:33 PM, Skip Montanaro s...@pobox.com wrote:
 I found a rather inscrutable use of dateutil recurrence rules in
 StackOverflow which generates a series of dates corresponding to the
 third Wednesday of the  month:

 import dateutil.rrule as dr
 import dateutil.relativedelta as drel

 dt = datetime.datetime(2012, 1, 1, 0, 0)
 rule = dr.rrule(dr.MONTHLY, byweekday=drel.WE(3), dtstart=dt, count=12)
-- 
https://mail.python.org/mailman/listinfo/python-list