Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Created May 5, 2015 20:23
Show Gist options
  • Save c0ldlimit/a80246b3ba963207fe4c to your computer and use it in GitHub Desktop.
Save c0ldlimit/a80246b3ba963207fe4c to your computer and use it in GitHub Desktop.
#python generate dates for every third friday
#http://stackoverflow.com/questions/2295765/generating-recurring-dates-using-python
import dateutil.rrule as dr
import dateutil.parser as dp
import dateutil.relativedelta as drel
rr = dr.rrule(dr.MONTHLY,byweekday=drel.FR(3),dtstart=start, count=10)
print map(str,rr)
print map(str,rr[::2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment