Last active
November 6, 2021 22:33
-
-
Save ErikBoesen/0b9e44a2b1bfc872c06278bc3b5c9456 to your computer and use it in GitHub Desktop.
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
UPDATE meals SET transfers = FALSE WHERE hall_id != 'CM'; | |
UPDATE meals SET transfers = TRUE WHERE hall_id != 'CM' AND date >= '2021-09-01'; | |
UPDATE meals SET transfers = FALSE WHERE hall_id != 'CM' AND name = 'Dinner' AND date IN ('2021-11-07', '2021-10-31', '2021-10-24', '2021-10-17', '2021-10-10', '2021-10-03', '2021-09-26', '2021-09-19', '2021-09-12'); |
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
import datetime | |
start_date = datetime.date(2021, 9, 8) | |
date = datetime.date(2021, 11, 7) | |
sundays = [] | |
while date > start_date: | |
sundays.append(date.strftime('%Y-%m-%d')) | |
date -= datetime.timedelta(days=7) | |
print(sundays) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment