1 """Collecting Day and date-related items."""
2 from datetime import datetime
4 DATE_FORMAT = '%Y-%m-%d'
8 """Individual days defined by their dates."""
10 def __init__(self, date: str):
12 self.datetime = datetime.strptime(date, DATE_FORMAT)
16 """Return what weekday matches self.date."""
17 return self.datetime.strftime('%A')
19 def __eq__(self, other: object):
20 return isinstance(other, self.__class__) and self.date == other.date
22 def __lt__(self, other):
23 return self.date < other.date