return date;
}
private static String checkExpressionHelper(String expression, String mode) {
Preconditions.checkNotNull(expression, "expression cannot be null");
ExpressionTreeBuilder parser = new ExpressionTreeBuilder();
try {
parser.parse(expression);
} catch (RecognitionException e) {
String message = String.format("Failed to parse %s expression '%s': "
+ "parse error at line %d position %d",
mode, expression, e.line, e.charPositionInLine);
throw new IllegalArgumentException(message);