DateRange.__contains__ = lambda self, x: self.start <= x < self.end
datetime(2010, 4, 20) in the_year_2010
datetime(2011, 4, 20) in the_year_2010
How to deal with "partial" dates (2010-00-00) from MySQL in Django?