private DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
//private DateFormat dateFormatter = SimpleDateFormat.getDateInstance(DateFormat.FULL, Locale.FRANCE);
public String getDateDisplay() {
if(dateDeNaissance==null){
return "";
}else
return dateFormatter.format(dateDeNaissance);
}
public void setDateDisplay(String dateDisplay) {
if(dateDisplay==null){
dateDeNaissance = null;
}
else{
try {
dateDeNaissance = dateFormatter.parse(dateDisplay);
} catch (ParseException e) {
// TODO: handle exception
dateDeNaissance = null;
}
}
}
Partager