private Date processEndDate(boolean require) throws ParseException {
        Date endDate = null;
        if (commandLine.hasOption(OPTION_END_DATE)) {
            endDate = parseDateTime(commandLine.getOptionValue(OPTION_END_DATE));
        }
        if (require && endDate == null) {
            throwMissingOptionException("The endDate is required for this option.");
        }
        return endDate;
    }