# using 11/1/21 as the date to start the calendar on because 11/1/21 is a monday and thus can use the days the class is taught on to determine the day offset
returnself.course.name+" in "+self.room.name+" with "+self.professor+" at "+self.day_taught+" "+self.hour_taught
def__repr__(self):
returnstr(self)
defcreate_event(self):
# creates an event that lasts the length of the class
service=get_calendar_service()
d=datetime.now().date()
dayOffset=0
ifself.day_taught=="Mo":
dayOffset=0
elifself.day_taught=="Tu":
dayOffset=1
elifself.day_taught=="We":
dayOffset=2
elifself.day_taught=="Th":
dayOffset=3
else:
dayOffset=4
# using 11/1/21 as the date to start the calendar on because 11/1/21 is a monday and thus can use the days the class is taught on to determine the day offset