src/org/ohmage/validator/AuditValidators.java
public static DateTime validateEndDate(final String endDate) 
			throws ValidationException {
		
		if(StringUtils.isEmptyOrWhitespaceOnly(endDate)) {
			return null;
		}
		
		try {
			return DateTimeUtils.getDateTimeFromString(endDate);
		}
		catch(IllegalArgumentException e) {
			throw new ValidationException(
					ErrorCode.SERVER_INVALID_DATE,
					"The date could not be parsed:" + endDate,
					e);
		}
	}
/**
	 * Validates that the end date is a valid date.
	 *  
	 * @param startDate The end date as a string to be validated.
	 * 
	 * @return Returns null if the end date is null or whitespace only; 
	 * 		   otherwise, it returns a Date representing the end date string.
	 * 
	 * @throws ValidationException Thrown if the end date is not null, not
	 * 							   whitespace only, and not a valid date.
	 */
Validates that the end date is a valid date.

@param startDate The end date as a string to be validated.

@return Returns null if the end date is null or whitespace only;
otherwise, it returns a Date representing the end date string.

@throws ValidationException Thrown if the end date is not null, not
whitespace only, and not a valid date.
Validates that the end date is a valid date . @param startDate The end date as a string to be validated . @return Returns null if the end date is null or whitespace only ; otherwise it returns a Date representing the end date string . @throws ValidationException Thrown if the end date is not null not whitespace only and not a valid date .
public static DateTime validateEndDate(final String endDate) 
			throws ValidationException {
		if(StringUtils.isEmptyOrWhitespaceOnly(endDate)) {
			return null;
		}
		try {
			return DateTimeUtils.getDateTimeFromString(endDate);
		}
		catch(IllegalArgumentException e) {
			throw new ValidationException(
					ErrorCode.SERVER_INVALID_DATE,
					"The date could not be parsed:" + endDate,
					e);
		}
	}
public static DateTime validateEndDate ( final String endDate ) throws ValidationException { if ( StringUtils . isEmptyOrWhitespaceOnly ( endDate ) ) { return null ; } try { return DateTimeUtils . getDateTimeFromString ( endDate ) ; } catch ( IllegalArgumentException e ) { throw new ValidationException ( ErrorCode . SERVER_INVALID_DATE , "The date could not be parsed:" + endDate , e ) ; } }
Validates that the end date is a valid date.
Validates that the end date is a valid date .