public static String validateCreditCardExp(String mmyy){
  String exp=checkNumeric(mmyy);
  if (exp.length() != 4)   return "CreditCardExpFormat";
  String mmStr=exp.substring(0,2);
  String yyStr=exp.substring(2,4);
  int mm=0;
  int yy=0;
  try {
    mm=Integer.parseInt(mmStr);
    yy=Integer.parseInt(yyStr);
  }
 catch (  Exception e) {
    return "CreditCardExpFormat";
  }
  return validateCreditCardExp(mm,yy);
}

public static String validateCreditCardExp ( String mmyy ) { String exp = checkNumeric ( mmyy ) ; if ( exp . length ( ) != 4 ) return "CreditCardExpFormat" ; String mmStr = exp . substring ( 0 , 2 ) ; String yyStr = exp . substring ( 2 , 4 ) ; int mm = 0 ; int yy = 0 ; try { mm = Integer . parseInt ( mmStr ) ; yy = Integer . parseInt ( yyStr ) ; } catch ( Exception e ) { return "CreditCardExpFormat" ; } return validateCreditCardExp ( mm , yy ) ; }
is this a valid credit card exp date ?
