def _guess_day_first_parameter(groups):
 if (_is_int(groups[0]) and valid_year(int(groups[0][:4]))):
  return False
 elif (_is_int(groups[(-1)]) and valid_year(int(groups[(-1)][(-4):]))):
  return True
 elif (_is_int(groups[0]) and (int(groups[0][:2]) > 31)):
  return False
 elif (_is_int(groups[(-1)]) and (int(groups[(-1)][(-2):]) > 31)):
  return True

def _guess_day_first_parameter ( groups ) : if ( _is_int ( groups [ 0 ] ) and valid_year ( int ( groups [ 0 ] [ : 4 ] ) ) ) : return False elif ( _is_int ( groups [ ( - 1 ) ] ) and valid_year ( int ( groups [ ( - 1 ) ] [ ( - 4 ) : ] ) ) ) : return True elif ( _is_int ( groups [ 0 ] ) and ( int ( groups [ 0 ] [ : 2 ] ) > 31 ) ) : return False elif ( _is_int ( groups [ ( - 1 ) ] ) and ( int ( groups [ ( - 1 ) ] [ ( - 2 ) : ] ) > 31 ) ) : return True
if day_first is not defined .