Class DateTimeParseFunction
- java.lang.Object
-
- com.ezylang.evalex.functions.AbstractFunction
-
- com.ezylang.evalex.functions.datetime.DateTimeParseFunction
-
- All Implemented Interfaces:
FunctionIfc
@FunctionParameter(name="value") @FunctionParameter(name="parameters",isVarArg=true) public class DateTimeParseFunction extends AbstractFunction
Parses a date-time string to aEvaluationValue.DataType.DATE_TIMEvalue.Optional arguments are the time zone and a list of
DateTimeFormatterpatterns. Each pattern will be tried to convert the string to a date-time. The first matching pattern will be used. IfNULLis specified for the time zone, the currently configured zone is used. If no formatter is specified, the function will use the formatters defined at theExpressionConfiguration.
-
-
Field Summary
-
Fields inherited from class com.ezylang.evalex.functions.AbstractFunction
MINUS_ONE
-
-
Constructor Summary
Constructors Constructor Description DateTimeParseFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationValueevaluate(Expression expression, Token functionToken, EvaluationValue... parameterValues)Performs the function logic and returns an evaluation result.-
Methods inherited from class com.ezylang.evalex.functions.AbstractFunction
getFunctionParameterDefinitions, hasVarArgs, validatePreEvaluation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ezylang.evalex.functions.FunctionIfc
getCountOfNonVarArgParameters, isParameterLazy
-
-
-
-
Method Detail
-
evaluate
public EvaluationValue evaluate(Expression expression, Token functionToken, EvaluationValue... parameterValues) throws EvaluationException
Description copied from interface:FunctionIfcPerforms the function logic and returns an evaluation result.- Parameters:
expression- The expression, where this function is executed. Can be used to access the expression configuration.functionToken- The function token from the parsed expression.parameterValues- The parameter values.- Returns:
- The evaluation result in form of a
EvaluationValue. - Throws:
EvaluationException- In case there were problems during evaluation.
-
-