public static Date parse(String dateString)
            throws ParseException {

        // Return null if no date provided
        if (dateString == null || dateString.isEmpty())
            return null;

        // Parse date according to format
        DateFormat dateFormat = new SimpleDateFormat(DateField.FORMAT);
        return dateFormat.parse(dateString);

    }
Parses the given string into a corresponding date. The string must
follow the standard format used by date fields, as defined by FORMAT
and as would be produced by format().

@param dateString
    The date string to parse, which may be null.

@return
    The date corresponding to the given date string, or null if the
    provided date string was null or blank.

@throws ParseException
    If the given date string does not conform to the standard format
    used by date fields.
guacamole-ext/src/main/java/org/apache/guacamole/form/DateField.java