private int[] updateDateIndexAndFormat(String[] words) {
        int indexDate1 = -1;
        int indexDate2 = -1;
        int toSkip = -1;
        for (int i = 0; i < words.length; i++) {
            if (i != toSkip) {
                for (int j = 0; j < dateFormats.size(); j++) {
                    SimpleDateFormat dateForm = dateFormats.get(j);
                    try {
                        dateForm.setLenient(false);
                        dateForm.parse(words[i]);
                        if (indexDate1 == -1) {
                            indexDate1 = i;
                        } else {
                            indexDate2 = i;
                        }
                    } catch (ParseException e) {
                    }
                }
                int[] otherResults = checkForOtherFormats(words, indexDate1,
                        indexDate2, i);
                if (otherResults[0] != -1) {
                    indexDate1 = otherResults[0];
                    if (otherResults[2] == 1) {
                        toSkip = i + 1;
                    }
                } else if (otherResults[1] != -1) {
                    indexDate2 = otherResults[1];
                    if (otherResults[2] == 1) {
                        toSkip = i + 1;
                    }
                }
            }
        }
        int[] result = { indexDate1, indexDate2 };
        return result;
    }