code: private boolean isValidPartialDateStringFormat(final String component, final char padding) {
  		// Empty is not valid
  		if (Util.empty(component)) {
  			return false;
  		}
  
  		int length = component.length();
  
  		// Check length YYYY, or YYYYMM, or YYYYMMDD
  		if (length != YEAR_END && length != MONTH_END && length != DAY_END) {
  			return false;
  		}
  
  		// Year - ???? or YYYY
  		String year = component.substring(YEAR_START, YEAR_END);
  		if (!isValidCharacters(year, padding) || !isValidYear(parseDateComponent(year, padding))) {
  			return false;
  		}
  
  		// Month - ?? or MM
  		if (component.length() >= MONTH_END) {
  			String month = component.substring(MONTH_START, MONTH_END);
  			if (!isValidCharacters(month, padding) || !isValidMonth(parseDateComponent(month,
  					padding))) {
  				return false;
  			}
  		}
  
  		// Day - ?? or DD
  		if (component.length() == DAY_END) {
  			String day = component.substring(DAY_START, DAY_END);
  			if (!isValidCharacters(day, padding) || !isValidDay(parseDateComponent(day, padding))) {
  				return false;
  			}
  		}
  
  		return true;
  	}
docs: Parses a component of a partial date.
  
  @param component the date component.
  @param padding the padding character.
  @return the parsed value, may be null.