src/org/ohmage/validator/VisualizationValidators.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, 
					"Only a date is allowed, not time: " + endDate);
		}
	}
/**
	 * Validates that a end date string is a valid date and returns it. If it
	 * is not a valid date, the request is failed and an exception is thrown.
	 * 
	 * @param endDate The end date string to be validated.
	 * 
	 * @return Returns null the end date is null or whitespace only. Otherwise, 
	 * 		   the end date as a DateTime object is returned.
	 * 
	 * @throws ValidationException Thrown if the end date is not null, not
	 * 							   whitespace only, and not a valid date.
	 */
Validates that a end date string is a valid date and returns it. If it
is not a valid date, the request is failed and an exception is thrown.

@param endDate The end date string to be validated.

@return Returns null the end date is null or whitespace only. Otherwise,
the end date as a DateTime object is returned.

@throws ValidationException Thrown if the end date is not null, not
whitespace only, and not a valid date.
Validates that a end date string is a valid date and returns it . If it is not a valid date the request is failed and an exception is thrown . @param endDate The end date string to be validated . @return Returns null the end date is null or whitespace only . Otherwise the end date as a DateTime object is returned . @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, 
					"Only a date is allowed, not time: " + endDate);
		}
	}
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 , "Only a date is allowed, not time: " + endDate ) ; } }
Validates that a end date string is a valid date and returns it.
Validates that a end date string is a valid date and returns it .