code: public static boolean isDate(String year, String month, String day) {
          // catch invalid years(not 2- or 4-digit) and invalid months and days.
          if (!(isYear(year) && isMonth(month) && isDay(day))) return false;
  
          int intYear = Integer.parseInt(year);
          int intMonth = Integer.parseInt(month);
          int intDay = Integer.parseInt(day);
  
          // catch invalid days, except for February
          if (intDay > daysInMonth[intMonth - 1]) return false;
          if ((intMonth == 2) && (intDay > daysInFebruary(intYear))) return false;
          return true;
      }
docs: isDate returns true if string arguments year, month, and day form a valid date.