public static String format(Date date) {
        DateFormat dateFormat = new SimpleDateFormat(DateTimeRestrictionField.FORMAT);
        return date == null ? null : dateFormat.format(date);
    }
Converts the given date into a string which follows the format used by
date fields.

@param date
    The date value to format, which may be null.

@return
    The formatted date, or null if the provided time was null.
extensions/guacamole-auth-restrict/src/main/java/org/apache/guacamole/auth/restrict/form/DateTimeRestrictionField.java