code: public static String parseCH(String inputText, boolean partialAllowed) {
  		if (StringUtils.isEmpty(inputText)) return null;
  		String text = cutNonDigitsAtBegin(inputText);
  		if (StringUtils.isEmpty(text)) return "";
  		text = cutNonDigitsAtEnd(text);
  		if (StringUtils.isEmpty(text)) return "";
  		
  		// Nun hat der String sicher keinen Punkt mehr am Anfang oder Ende
  		
  		if (inputText.indexOf(".") > -1) {
  			return parseCHWithDot(inputText, partialAllowed);
  		} else {
  			return parseCHWithoutDot(inputText, partialAllowed);
  		}
  	}
docs: Converts a CH - Date String in a yyyy-mm-dd String. The conversion
  is very lenient and tries to convert as long as its somehow clear
  what the user may have wanted.
  
  @param inputText The input text. Maybe empty or <code>null</code>.
  @param partialAllowed false if the inputText has to be a complete date with month and day
  @return null if the input text is empty (<code>null</code> or length 0). An empty String
  if the input text doesn't fit a date or a String in format yyyy-mm-dd (or yyyy-mm or even
  yyyy if partial allowed)