code: public static boolean isTime(String hour, String minute, String second) {
          // catch invalid years(not 2- or 4-digit) and invalid months and days.
          if (isHour(hour) && isMinute(minute) && isSecond(second))
              return true;
          else
              return false;
      }
docs: isTime returns true if string arguments hour, minute, and second form a valid time.