code: def from_pydate(cls, pydate):
          
          return cls(days=(datetime.datetime.combine(pydate, datetime.time(0, 0, 0)) - _datetime2_base_date).days)
docs: Creates sql date object from Python date object.
          @param pydate: Python date
          @return: sql date