code: @Override
  	protected boolean isValid() {
  		// Get the date we are validating.
  		WDateField dateField = (WDateField) this.getInputField();
  		Date date = dateField.getDate();
  
  		if (date == null) {
  			// No date, so nothing to validate.
  			return true;
  		}
  
  		// Determine the pivot date
  		Date pivot = null;
  
  		if (variablePivot != null) {
  			pivot = variablePivot.getDate();
  
  			if (pivot == null) {
  				// No pivot value, so default to true.
  				return true;
  			}
  		} else if (fixedPivot != null) {
  			pivot = fixedPivot;
  		}
  
  		// We take a null pivot date as meaning "today"
  		if (pivot == null) {
  			pivot = new Date();
  		}
  
  		// Round the dates to nearest day.
  		pivot = DateUtilities.roundToDay(pivot);
  		date = DateUtilities.roundToDay(date);
  
  		// Perform the comparison with the pivot
  		switch (operator) {
  			case BEFORE:
  				return date.before(pivot);
  			case BEFORE_OR_EQUAL:
  				return !pivot.before(date);
  			case EQUAL:
  				return date.equals(pivot);
  			case AFTER_OR_EQUAL:
  				return !pivot.after(date);
  			case AFTER:
  				return date.after(pivot);
  			default:
  				throw new SystemException("Unknown operator. [" + operator + "]");
  		}
  	}
docs: {@inheritDoc}