1 diff -ur jfreereport_libformula.org/source/org/pentaho/reporting/libraries/formula/function/datetime/DateValueFunction.java jfreereport_libformula/source/org/pentaho/reporting/libraries/formula/function/datetime/DateValueFunction.java
2 --- jfreereport_libformula.org/source/org/pentaho/reporting/libraries/formula/function/datetime/DateValueFunction.java 2010-06-01 17:15:50.000000000 +0200
3 +++ jfreereport_libformula/source/org/pentaho/reporting/libraries/formula/function/datetime/DateValueFunction.java 2015-07-14 17:24:42.503895240 +0200
5 package org.pentaho.reporting.libraries.formula.function.datetime;
8 +import java.util.Calendar;
10 import org.pentaho.reporting.libraries.formula.EvaluationException;
11 import org.pentaho.reporting.libraries.formula.FormulaContext;
13 import org.pentaho.reporting.libraries.formula.typing.Type;
14 import org.pentaho.reporting.libraries.formula.typing.TypeRegistry;
15 import org.pentaho.reporting.libraries.formula.typing.coretypes.DateTimeType;
16 +import org.pentaho.reporting.libraries.formula.util.DateUtil;
19 * This function returns
21 final Object value = parameters.getValue(0);
23 final Date date1 = typeRegistry.convertToDate(type, value);
24 - return new TypeValuePair(DateTimeType.DATE_TYPE, date1);
25 + final Date date = DateUtil.normalizeDate(date1, DateTimeType.DATE_TYPE);
27 + return new TypeValuePair(DateTimeType.DATE_TYPE, date);