String month = fields[++index];
String day = fields[++index];
String year = fields[++index];
String time = "00:00";
Calendar cal = Calendar.getInstance();
if (year.indexOf(':') > 0) {
time = year;
year = Integer.toString(cal.get(Calendar.YEAR));
}
// put together & parse
StringBuffer stamp = new StringBuffer(month);
stamp.append('-');
stamp.append(day);
stamp.append('-');
stamp.append(year);
stamp.append('-');
stamp.append(time);
Date lastModified = null;
try {
lastModified = dateFormatter.parse(stamp.toString());
}
catch (ParseException ex) {
if (!ignoreDateParseErrors)
throw new DateParseException(ex.getMessage());
}
// can't be in the future - must be the previous year
// add 2 days just to allow for different time zones
cal.add(Calendar.DATE, 2);
if (lastModified != null && lastModified.after(cal.getTime())) {
cal.setTime(lastModified);
cal.add(Calendar.YEAR, -1);
lastModified = cal.getTime();
}
// we've got to find the starting point of the name.
String name = raw.trim();
for (int i = 0; i < MIN_FIELD_COUNT-1; i++) {