|
|
|
Un metodo para validar una fecha capturada en un String
import java.text.SimpleDateFormat;
import java.util.Date;
import java.text.DateFormat;
import java.text.ParseException;
//metodo
private static boolean isFechaValida(String fechax) {
boolean ret=true;
try {
SimpleDateFormat formatoFecha = new SimpleDateFormat("dd/MM/yyyy",
Locale.getDefault());
formatoFecha.setLenient(false);
formatoFecha.parse(fechax);
} catch (ParseException e) {
ret=false;
}
return ret;
}
Aporte: Ignacio.lxc
|
|
|
|
|
|
|
|
|
|
|
|