Skip to content

Instantly share code, notes, and snippets.

@somyamohanty
Created April 18, 2014 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save somyamohanty/11066762 to your computer and use it in GitHub Desktop.
Save somyamohanty/11066762 to your computer and use it in GitHub Desktop.
Date range
from datetime import date
from dateutil.rrule import rrule, DAILY, HOURLY
a = date(2009, 5, 30)
b = date(2009, 6, 9)
for dt in rrule(DAILY, dtstart=a, until=b):
print dt.strftime("%Y-%m-%d")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment