class Day:
"""Individual days defined by their dates."""
- def __init__(self, date:str):
+ def __init__(self, date: str):
self.date = date
self.datetime = datetime.strptime(date, DATE_FORMAT)
"""Return what weekday matches self.date."""
return self.datetime.strftime('%A')
- def __eq__(self, other:object):
+ def __eq__(self, other: object):
return isinstance(other, self.__class__) and self.date == other.date
- def __lt__(self, other:Day):
+ def __lt__(self, other):
return self.date < other.date