Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from datetime import timedelta, date
- def daterange(start, end, 1):
- L = timedelta(step)
- while start.year < end.year or start.month < end.month or start.day < end.day:
- yield start
- start += L
- for date in daterange(date(2011, 01, 01), date(2011, 05, 04)):
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement