X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/copy_structured?a=blobdiff_plain;f=days.py;h=8db9f15b7362ede61c70265e4d5eb8a4c2c0c626;hb=51cdb0020cf8f1c0a0c11cc80be98863fce2448b;hp=42fc4c15280f616f0ee637503a4c98319e40d2c6;hpb=bf0868a41a86ea5952d5fc1a8fca6621e89ad42e;p=plomtask diff --git a/days.py b/days.py index 42fc4c1..8db9f15 100644 --- a/days.py +++ b/days.py @@ -8,7 +8,7 @@ DATE_FORMAT = '%Y-%m-%d' 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) @@ -17,8 +17,8 @@ class Day: """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