def _build_date(date, kwargs):
 if (date is None):
  if (not kwargs):
   raise ValueError('Must pass a date or kwargs')
  else:
   return datetime.date(**kwargs)
 elif kwargs:
  raise ValueError('Cannot pass kwargs and a date')
 else:
  return date

def _build_date ( date , kwargs ) : if ( date is None ) : if ( not kwargs ) : raise ValueError ( 'Must pass a date or kwargs' ) else : return datetime . date ( ** kwargs ) elif kwargs : raise ValueError ( 'Cannot pass kwargs and a date' ) else : return date
returns the build date in the form yyyy-mm-dd as a string .