2 """Collecting Day and date-related items."""
3 from datetime import datetime
5 DATE_FORMAT = '%Y-%m-%d'
9 """Individual days defined by their dates."""
11 def __init__(self, date: str):
13 self.datetime = datetime.strptime(date, DATE_FORMAT)
17 """Return what weekday matches self.date."""
18 return self.datetime.strftime('%A')
20 def __eq__(self, other: object):
21 return isinstance(other, self.__class__) and self.date == other.date
23 def __lt__(self, other):
24 return self.date < other.date