code: public static String format(final Object object, final String pattern) {
  		if (object instanceof Date) {
  			return JKFormatUtil.formatDate((Date) object, pattern);
  		}
  		if (object instanceof Time) {
  			return JKFormatUtil.formatTime((Time) object, pattern);
  		}
  		if (object instanceof Timestamp) {
  			return JKFormatUtil.formatTimeStamp((Timestamp) object, pattern);
  		}
  		if (object instanceof java.util.Date) {
  			return JKFormatUtil.formatDate((java.util.Date) object, pattern);
  		}
  		if (object instanceof Double) {
  			return JKFormatUtil.formatDouble((Double) object, pattern);
  		}
  		if (object != null) {
  			return object.toString();
  		}
  		return null;
  	}
docs: Format.
  
  @param object  the object
  @param pattern the pattern
  @return the string