Skip to content
Snippets Groups Projects
Commit 8b26248e authored by Andreas Valder's avatar Andreas Valder
Browse files

fixed a bug in last commit

parent 1ee9236b
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,6 @@ def timetable(): ...@@ -24,7 +24,6 @@ def timetable():
weekofyear = str(datetime.today().year) + "-W" + str(datetime.today().isocalendar()[1]) weekofyear = str(datetime.today().year) + "-W" + str(datetime.today().isocalendar()[1])
else: else:
datesweekmonday -= timedelta(days=datesweekmonday.weekday()) datesweekmonday -= timedelta(days=datesweekmonday.weekday())
weekofyear = str(datesweekmonday.year) + "-W" + str(datesweekmonday.isocalendar()[1])
kw = int((datesweekmonday.date() - thisweekmonday.date()).days/7) kw = int((datesweekmonday.date() - thisweekmonday.date()).days/7)
else: else:
kw=0 kw=0
...@@ -34,6 +33,7 @@ def timetable(): ...@@ -34,6 +33,7 @@ def timetable():
start = date.today() - timedelta(days=date.today().weekday() -7*kw) start = date.today() - timedelta(days=date.today().weekday() -7*kw)
except: except:
start = date.today() - timedelta(days=date.today().weekday()) start = date.today() - timedelta(days=date.today().weekday())
weekofyear = str(start.year) + "-W" + str(start.isocalendar()[1])
days = [{'date': start, 'lectures': [], 'atonce':0, 'index': 0 }] days = [{'date': start, 'lectures': [], 'atonce':0, 'index': 0 }]
earlieststart=time(23,59) earlieststart=time(23,59)
latestend=time(0,0) latestend=time(0,0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment