Created
July 19, 2018 19:13
-
-
Save jefersondaniel/7e1e137c170288c60f8daf43f834563a to your computer and use it in GitHub Desktop.
daterange.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timedelta | |
actual_date = datetime(2018, 5, 8) | |
end_date = datetime(2018, 7, 18) | |
out = open('/tmp/daterange.txt', 'w') | |
while actual_date < end_date: | |
out.write(actual_date.strftime('%Y-%m-%d') + '\n') | |
actual_date = actual_date + timedelta(days=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment