Class WeekDayFunction
java.lang.Object
org.pentaho.reporting.libraries.formula.function.datetime.WeekDayFunction
- All Implemented Interfaces:
Serializable
,Function
This function extracts the day of week from a date. The returned value
depends of the Type passed as second argument using the following table:
Day of Week | Type=1 Result | Type=2 Result | Type=3 Result |
---|---|---|---|
Sunday | 1 | 7 | 6 |
Monday | 2 | 1 | 0 |
Tuesday | 3 | 2 | 1 |
Wednesday | 4 | 3 | 2 |
Thursday | 5 | 4 | 3 |
Friday | 6 | 5 | 4 |
Saturday | 7 | 6 | 5 |
- Author:
- Cedric Pronzato
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
convertType
(int currentDayOfWeek, int type) evaluate
(FormulaContext context, ParameterCallback parameters)
-
Constructor Details
-
WeekDayFunction
public WeekDayFunction()
-
-
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
-
convertType
public int convertType(int currentDayOfWeek, int type)
-