field.setName("fieldName");
Map<String, String> errors = new HashMap<String, String>();
Calendar expected = new GregorianCalendar(2008, 11, 15, 8, 43); // seriously month is zero based.
Date value = (Date)field.clean(new String[]{"12/15/2008 8:43"}, errors);
assertEquals(expected.getTime(), value);
}
public void test2DigitYearDateTime() throws Exception {
Field field = injector.getInstance(DateTimeField.class);