public static DVConstraint createDateConstraint(int comparisonOperator, String expr1, String expr2, String dateFormat) {if (expr1 == null) {throw new IllegalArgumentException("expr1 must be supplied");}OperatorType.validateSecondArg(comparisonOperator, expr2);SimpleDateFormat df = null;if (dateFormat != null) {df = new SimpleDateFormat(dateFormat, LocaleUtil.getUserLocale());df.setTimeZone(LocaleUtil.getUserTimeZone());}String formula1 = getFormulaFromTextExpression(expr1);Double value1 = formula1 == null ? convertDate(expr1, df) : null;String formula2 = getFormulaFromTextExpression(expr2);Double value2 = formula2 == null ? convertDate(expr2, df) : null;return new DVConstraint(ValidationType.DATE, comparisonOperator, formula1, formula2, value1, value2, null);}

public static DVConstraint createDateConstraint ( int comparisonOperator , String expr1 , String expr2 , String dateFormat ) { if ( expr1 == null ) { throw new IllegalArgumentException ( "expr1 must be supplied" ) ; } OperatorType . validateSecondArg ( comparisonOperator , expr2 ) ; SimpleDateFormat df = null ; if ( dateFormat != null ) { df = new SimpleDateFormat ( dateFormat , LocaleUtil . getUserLocale ( ) ) ; df . setTimeZone ( LocaleUtil . getUserTimeZone ( ) ) ; } String formula1 = getFormulaFromTextExpression ( expr1 ) ; Double value1 = formula1 == null ? convertDate ( expr1 , df ) : null ; String formula2 = getFormulaFromTextExpression ( expr2 ) ; Double value2 = formula2 == null ? convertDate ( expr2 , df ) : null ; return new DVConstraint ( ValidationType . DATE , comparisonOperator , formula1 , formula2 , value1 , value2 , null ) ; }
public static DVConstraint CreateDateConstraint(int comparisonOperator, String expr1, String expr2, String dateFormat){if (expr1 == null){throw new ArgumentException("expr1 must be supplied");}OperatorType.ValidateSecondArg(comparisonOperator, expr2);SimpleDateFormat df = dateFormat == null ? null : new SimpleDateFormat(dateFormat);String formula1 = GetFormulaFromTextExpression(expr1);Double value1 = formula1 == null ? ConvertDate(expr1, df) : Double.NaN;String formula2 = GetFormulaFromTextExpression(expr2);Double value2 = formula2 == null ? ConvertDate(expr2, df) : Double.NaN;return new DVConstraint(ValidationType.DATE, comparisonOperator, formula1, formula2, value1, value2, null);}
