public static boolean isDate(String s){
  pp.setIndex(0);
  return df.parse(s,pp) != null;
}

public static boolean isDate ( String s ) { pp . setIndex ( 0 ) ; return df . parse ( s , pp ) != null ; }
tests the string for a date starting at position zero .
