Skip to content

Instantly share code, notes, and snippets.

@taross-f
Created August 13, 2020 13:42
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 taross-f/0de5a707c3ed02be2ebd7d7cde82a536 to your computer and use it in GitHub Desktop.
Save taross-f/0de5a707c3ed02be2ebd7d7cde82a536 to your computer and use it in GitHub Desktop.
generate date list from date range
from datetime import datetime, timedelta
target_dates = []
current = start_date
while start_date <= end_date and current <= end_date:
target_dates.append(current)
current += timedelta(days=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment