Skip to content

Instantly share code, notes, and snippets.

@boertel
Created April 16, 2014 18:50
Show Gist options
  • Select an option

  • Save boertel/10919852 to your computer and use it in GitHub Desktop.

Select an option

Save boertel/10919852 to your computer and use it in GitHub Desktop.
"Week" number
from dateutil.rrule import *
from datetime import datetime
rr = rrule(WEEKLY, count=7, byweekday=(TH), bysetpos=1, dtstart=datetime(2014,4,10))
print list(rr).index(rr.after(datetime.utcnow())) + 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment