JexlDateFunctions implements ExpressionContextVisitor { public String addDays(Object odays, String format) { int days = FunctionHandler.getInt(odays); Calendar now = Calendar.getInstance(); now.add(Calendar.DAY_OF_YEAR, days); DateFormat formatter = getFormatter(format); return formatter.format(now.getTime()); }  String currentDate(String format, String timezone); String currentDate(String format); String currentTimeMilis(); String addDays(Object odays, String format); @Override void visit(JexlContext context);  }
@Test @Tag(TestGroups.FUNCTIONAL) public void testAddDays() { String date = variables.evaluate("#{dateFunctions.addDays(1, '07-05-2012')}"); assertNotNull(date); date = variables.evaluate("#{dateFunctions.addDays(5, '07-05-2012')}"); assertNotNull(date); date = variables.evaluate("#{dateFunctions.addDays(-50, '07-05-2012')}"); assertNotNull(date); }