Created
August 13, 2020 13:42
-
-
Save taross-f/0de5a707c3ed02be2ebd7d7cde82a536 to your computer and use it in GitHub Desktop.
generate date list from date range
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 | |
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