private Date getLatestPeriod(Date now, int runId) { com.dianping.cat.home.dal.abtest.AbtestReport latestReport = null; Date period = null; try { latestReport = m_abtestReportDao.findLatestReportByRunId(runId, AbtestReportEntity.READSET_FULL); } catch (Exception e) { // ignore it } if (latestReport == null) { m_calendar.setTime(now); m_calendar.add(Calendar.DAY_OF_MONTH, -14); period = m_calendar.getTime(); } else { period = latestReport.getPeriod(); } return period; }