def _date_to_datetime(value):
  """Convert a date to a datetime for datastore storage.

  Args:
    value: A datetime.date object.

  Returns:
    A datetime object with time set to 0:00.
  """
  if not isinstance(value, datetime.date):
    raise TypeError('Cannot convert to datetime expected date value; '
                    'received %s' + value)
  return datetime.datetime(value.year, value.month, value.day)
dataset/ETHPy150Open GoogleCloudPlatform/datastore-ndb-python/ndb/model.py/_date_to_datetime/operator `%` -> `+`