Class DateDifFunction
java.lang.Object
org.pentaho.reporting.libraries.formula.function.datetime.DateDifFunction
- All Implemented Interfaces:
Serializable
,Function
This function returns the number of years, months, or days between two date
numbers.
The Format is a code from the following table, entered as text, that specifies the format you want:
The Format is a code from the following table, entered as text, that specifies the format you want:
format | Returns the number of |
---|---|
y | Years |
m | Months. If there is not a complete month between the dates, 0 will be returned. |
d | Days |
md | Days, ignoring months and years |
ym | Months, ignoring years |
yd | Days, ignoring years |
- Author:
- Cedric Pronzato
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
YEARS_CODE
- See Also:
-
MONTHS_CODE
- See Also:
-
DAYS_CODE
- See Also:
-
DAYS_IGNORING_YEARS
- See Also:
-
MONTHS_IGNORING_YEARS
- See Also:
-
DAYS_IGNORING_MONTHS_YEARS
- See Also:
-
-
Constructor Details
-
DateDifFunction
public DateDifFunction()
-
-
Method Details
-
getCanonicalName
- Specified by:
getCanonicalName
in interfaceFunction
-
evaluate
public TypeValuePair evaluate(FormulaContext context, ParameterCallback parameters) throws EvaluationException - Specified by:
evaluate
in interfaceFunction
- Throws:
EvaluationException
-