package org.mifos.framework.formulaic;

import java.util.Date;
import java.util.Map;

import org.mifos.framework.exceptions.InvalidDateException;
import org.mifos.framework.util.helpers.DateUtils;

public class DateComponentValidator extends IsInstanceValidator {
 	
	DateComponentValidator() {
		super(Map.class);
	}
	
	@Override
	public Date validate(Object input) throws ValidationError {
		input = super.validate(input);
		Map inputMap = (Map) input;
		if (inputMap.size() == 0) {
			throw new ValidationError(input, MISSING_ERROR);
		}
		try {
			String dayValue = (String) inputMap.get("DD");
			String monthValue = (String) inputMap.get("MM");
			String yearValue = (String) inputMap.get("YY");
			return DateUtils.parseBrowserDateFields(yearValue, monthValue, dayValue);
		}
		catch (InvalidDateException e) {
			throw new ValidationError(input, DateValidator.DATE_FORMAT_ERROR);
		}
	}

}

@@ -261,16 +261,23 @@
 r %7B%0A %09%0A%09
+public 
 DateComp

fix for compiler error - caused because DateComponentValidator constructor was proteceted, not public