(self, t: datetime.datetime)
return self.from_year <= t.year <= self.to_year
Return True if current year range contains t, False if not
Return True if current year range contains t, False if not
Return True if current year range contains t False if not
def contains(self, t: datetime.datetime) -> bool:
        """Return True if current year range contains t, False if not"""
        if self.from_year is None:
            return True

        assert self.from_year is not None
        assert self.to_year is not None
        return self.from_year <= t.year <= self.to_year
def contains ( self , t : datetime . datetime ) -> bool : if self . from_year is None : return True assert self . from_year is not None assert self . to_year is not None return self . from_year <= t . year <= self . to_year