import java.text.DateFormat;
public class ValiderDate
{
public static void main(String[] arg) throws Exception
{
System.out.println(estElleValide("2003-02-27"));
}
public static boolean estElleValide(String date) throws Exception
{
//Affiche une erreur si la date est incorrecte
DateFormat fd = DateFormat.getDateInstance(DateFormat.SHORT);
fd.setLenient(false);
fd.parse(date);
return true;
}
}