Formats the date of the event with the given format

@param format the format
@return the formatted date
199606
public String getFormattedDate(String format) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);
        return dateFormat.format(date);
    }
1009533
public static String format(Date date, String format) {
		if (null == date || StrUtil.isBlank(format)) {
			return null;
		}
		return format(date, FastDateFormat.getInstance(format));
	}
670730
public static String getDateTime(Date date, Format format) {

        StringBuffer buf = new StringBuffer();
        buf.append(getDate(date, format));
        buf.append(" ");
        buf.append(getTime(date, format));
        return buf.toString();
    }
132337
private String formatDate(Date date) {

        if (null == m_dateFormat) {
            m_dateFormat = DateFormat.getDateInstance(
                0,
                OpenCms.getWorkplaceManager().getWorkplaceLocale(getCmsObject()));
        }
        return m_dateFormat.format(date);
    }
63310
public static String formatDate(int style,Date date){
		if (date == null) {
			return "";
		}
		if (style < 0) {
			style = DateFormat.DEFAULT;
		}
		return DateFormat.getDateInstance(style).format(date);
	}
642738
public static String getFormatDate(String format, Date date) {
        return getFormatDate(format, date, ZoneId.systemDefault().getId());
    }
846253
@MapMethod
    public String formatDate(Date d, String format){
        return Objects.formatDate(d, format);
    }
693078
public PactDslJsonArray timestamp(String format) {
      FastDateFormat instance = FastDateFormat.getInstance(format);
      body.put(instance.format(new Date(DATE_2000)));
      generators.addGenerator(Category.BODY, rootPath + appendArrayIndex(0), new DateTimeGenerator(format));
      matchers.addRule(rootPath + appendArrayIndex(0), matchTimestamp(format));
      return this;
    }
542988
public String date (String format, Object arg)
    {
        Date when = massageDate(arg);
        if (when == null) {
            return format;
        }
        SimpleDateFormat fmt = new SimpleDateFormat(format, getLocale());
        return fmt.format(when);
    }
1363380
public static String format(String format) {

        if (format == null) {
            format = DEFAULT_FORMAT;
        } else {
            if (format.contains("M")) {
                format = format.replace("M", "m");
            }

            if (format.contains("Y")) {
                format = format.replace("Y", "y");
            }

            if (format.contains("D")) {
                format = format.replace("D", "d");
            }
        }
        return format;
    }
736277
public final String format(Date date)
    {
        return format(date, new StringBuffer(),
                      DontCareFieldPosition.INSTANCE).toString();
    }
1107337
public static String convertFormat(String format) {
		if (format == null)
			return null;
		else {
			// day of week
			format = format.replaceAll("EEE", "D");
			// year
			format = format.replaceAll("yy", "y");

			// month
			if (format.indexOf("MMM") != -1) {
				format = format.replaceAll("MMM", "M");
			} else {
				format = format.replaceAll("M", "m");
			}
			return format;
		}
	}
333465
public function format($format = null) {
        if(is_null($format)) {
            $format = $this->getFormatter()->getDateTimeFormat();
        }
        return date($format, $this->getEpoch());
    }
1225648
public PactDslJsonArray timestamp(String format, Date example) {
        FastDateFormat instance = FastDateFormat.getInstance(format);
        body.put(instance.format(example));
        matchers.addRule(rootPath + appendArrayIndex(0), matchTimestamp(format));
        return this;
    }
287640
public static String toJavaDatePattern(String format) {

        int          len = format.length();
        char         ch;
        StringBuffer sb        = new StringBuffer(len);
        Tokenizer    tokenizer = new Tokenizer();

        for (int i = 0; i <= len; i++) {
            ch = (i == len) ? e
                            : format.charAt(i);

            if (!tokenizer.next(ch, dateTokens)) {
                int index = tokenizer.getLastMatch();

                if (index >= 0) {
                    sb.setLength(sb.length() - tokenizer.length());
                    sb.append(javaDateTokens[index]);
                }

                tokenizer.reset();

                if (tokenizer.isConsumed()) {
                    continue;
                }
            }

            sb.append(ch);
        }

        sb.setLength(sb.length() - 1);

        String javaPattern = sb.toString();

        return javaPattern;
    }
479630
public static Calendar parse(final String date, final String format) {
		return parse(date, DateTimeFormat.forPattern(format));
	}
155362
public static String getDate(Date date, Format format) {

        DateTimeFormat df;
        switch (format) {
            case FULL:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_FULL);
                break;
            case LONG:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_LONG);
                break;
            case MEDIUM:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_MEDIUM);
                break;
            case SHORT:
                df = DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_SHORT);
                break;
            default:
                // can never happen, just to prevent stupid warning
                return "";
        }
        return df.format(date);
    }