private Date getMinDate(List<Stat> vals) {
        List<Date> dates = new ArrayList<Date>();
        for (Stat st: vals) if (st != null) dates.add(st.getWhen());
        return Collections.min(dates);
    }