code: private String formatDate(final WPartialDateField dateField) {
  		Integer day = dateField.getDay();
  		Integer month = dateField.getMonth();
  		Integer year = dateField.getYear();
  
  		if (day != null || month != null || year != null) {
  			StringBuffer buf = new StringBuffer(10);
  
  			append(buf, year, 4);
  			buf.append('-');
  			append(buf, month, 2);
  			buf.append('-');
  			append(buf, day, 2);
  
  			return buf.toString();
  		}
  
  		return null;
  	}
docs: Formats a partial date to the format required by the schema.
  
  @param dateField the date field containing the date to format.
  @return the formatted date.