Skip to content

Instantly share code, notes, and snippets.

@ErikBoesen
Last active November 6, 2021 22:33
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 ErikBoesen/0b9e44a2b1bfc872c06278bc3b5c9456 to your computer and use it in GitHub Desktop.
Save ErikBoesen/0b9e44a2b1bfc872c06278bc3b5c9456 to your computer and use it in GitHub Desktop.
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');
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