code: public boolean isValidDate(int month, int day, int year, int hour, 
                                 int minute, int second, int millisecond) {
          boolean valid = true;
          if ( month < 1 || month > 12 ) {
              valid = false;
          } else if ( validDay(month, day, year) == false ) {
              valid = false;
          } else if ( hour < 0 || hour > 23 ) {
              valid = false;
          } else if ( minute < 0 || minute > 59 ) {
              valid = false;
          } else if ( second < 0 || second > 59 ) {
              valid = false;
          } else if ( millisecond < 0 || millisecond > 999 ) {
              valid = false;
          }
          return valid;
      }
docs: Check if all values in the given data are valid and that the result will
  be a valid date.
  
  @param month The month (1-12)
  @param day The day (1-31)
  @param year The year (4-digit)
  @param hour The hour (0-23)
  @param minute The minutes (0-59)
  @param second The seconds (0-59)
  @param millisecond The milliseconds (0-999)
  
  @return <code>true</code> if all data represents a valid date,
  <code>false</code> otherwise