// - YYYY ... (default age-out: 3 years)
String dateStr = m.group(2);
Date indexDate = null;
long periodInMs = -1;
ThreadSafeSimpleDateFormat dateFormatter = new ThreadSafeSimpleDateFormat("yyyy.MM.dd");
try {
indexDate = dateFormatter.parse(dateStr);
if (-1 == ageOutTime) { // (ie not overridden)
ageOutTime = AGE_OUT_TIME_DAYS; // (default)
}
periodInMs = 3600L*24L*1000L; // (24h)
}//TESTED