Last active
January 28, 2020 21:26
-
-
Save kareiva/d5d1e5a843e49a321756 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
#!/usr/bin/python | |
import datetime | |
year = 2020 | |
def round_name(week): | |
return { | |
1: 'VHF', | |
2: 'UHF', | |
3: 'SHF', | |
4: 'Microwave', | |
}[week] | |
for month in range(1, 13): | |
for day in range(1, 29): | |
loop_date = datetime.datetime(year, month, day) | |
if loop_date.weekday() == 1: | |
lyacround = int((day - 1) / 7 + 1) | |
rounddate = loop_date.strftime('%Y-%m-%d') | |
print("INSERT INTO rounds VALUES('','" + | |
rounddate + | |
"','" + | |
round_name(lyacround) + | |
"'," + repr(lyacround) + | |
");") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment