Class WeekDayFunction
- java.lang.Object
-
- org.pentaho.reporting.libraries.formula.function.datetime.WeekDayFunction
-
- All Implemented Interfaces:
Serializable
,Function
public class WeekDayFunction extends Object implements 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WeekDayFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
convertType(int currentDayOfWeek, int type)
TypeValuePair
evaluate(FormulaContext context, ParameterCallback parameters)
String
getCanonicalName()
-
-
-
Method Detail
-
getCanonicalName
public String 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)
-
-