assertEquals(1293832800L, epoch);
}
@SuppressWarnings("deprecation")
public void test_date() {
DateValue date = DateUtils.convertToDateValue("5.10.2009");
assertEquals("05", date.get(DAY));
assertEquals("10", date.get(MONTH));
assertEquals("2009", date.get(YEAR));
// date = DateUtils.toDate(null);
// assertEquals("", date.get(DAY));
// assertEquals("", date.get(MONTH));
// assertEquals("", date.get(YEAR));
date = DateUtils.convertToDateValue("");
assertEquals("", date.get(DAY));
assertEquals("", date.get(MONTH));
assertEquals("", date.get(YEAR));
date = DateUtils.convertToDateValue(".");
assertEquals("", date.get(DAY));
assertEquals("", date.get(MONTH));
assertEquals("", date.get(YEAR));
date = DateUtils.convertToDateValue("..");
assertEquals("", date.get(DAY));
assertEquals("", date.get(MONTH));
assertEquals("", date.get(YEAR));
date = DateUtils.convertToDateValue("...");
assertEquals("", date.get(DAY));
assertEquals("", date.get(MONTH));
assertEquals("", date.get(YEAR));
date = DateUtils.convertToDateValue("5..2009");
assertEquals("05", date.get(DAY));
assertEquals("", date.get(MONTH));
assertEquals("2009", date.get(YEAR));
date = DateUtils.convertToDateValue("asdada");
assertEquals("asdada", date.get(DAY));
assertEquals("", date.get(MONTH));
assertEquals("", date.get(YEAR));
date = DateUtils.convertToDateValue("1.2.3.4.5.6.7.8");
assertEquals("01", date.get(DAY));
assertEquals("02", date.get(MONTH));
assertEquals("3", date.get(YEAR));
}