org.jfree.formula.function.datetime

Class DateDifFunction

public class DateDifFunction extends Object implements 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:

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

Field Summary
static StringDAYS_CODE
static StringDAYS_IGNORING_MONTHS_YEARS
static StringDAYS_IGNORING_YEARS
static StringMONTHS_CODE
static StringMONTHS_IGNORING_YEARS
static StringYEARS_CODE
Constructor Summary
DateDifFunction()
Method Summary
TypeValuePairevaluate(FormulaContext context, ParameterCallback parameters)
StringgetCanonicalName()

Field Detail

DAYS_CODE

public static final String DAYS_CODE

DAYS_IGNORING_MONTHS_YEARS

public static final String DAYS_IGNORING_MONTHS_YEARS

DAYS_IGNORING_YEARS

public static final String DAYS_IGNORING_YEARS

MONTHS_CODE

public static final String MONTHS_CODE

MONTHS_IGNORING_YEARS

public static final String MONTHS_IGNORING_YEARS

YEARS_CODE

public static final String YEARS_CODE

Constructor Detail

DateDifFunction

public DateDifFunction()

Method Detail

evaluate

public TypeValuePair evaluate(FormulaContext context, ParameterCallback parameters)

getCanonicalName

public String getCanonicalName()