throw new NoSuchEntityException(username);
}
String[] dateRange = dateRangeParam.split("\\.\\.");
if (dateRange.length != 2) {
throw new InvalidDateParamException(dateRangeParam);
}
Date fromDate, toDate;
try {
fromDate = DateUtil.getDate(dateRange[0], DATE_FORMAT);
toDate = DateUtil.getDate(dateRange[1], DATE_FORMAT);
fromDate = DateUtil.getStartOfDay(fromDate);
toDate = DateUtil.getEndOfTheDay(toDate);
if (fromDate.after(toDate) || !DateUtil.isDatesInRange(fromDate,
toDate, MAX_STATS_DAYS)) {
throw new InvalidDateParamException(dateRangeParam);
}
} catch (IllegalArgumentException e) {
throw new InvalidDateParamException(dateRangeParam);
}
LocaleStatistics localeStatistics = new LocaleStatistics();
List<Object[]> data =