6,7 → 6,6 |
|
import org.tela_botanica.client.modeles.aDonnee; |
import org.tela_botanica.client.modeles.personne.Personne; |
import org.tela_botanica.client.util.UtilString; |
|
import com.extjs.gxt.ui.client.data.BaseModelData; |
import com.google.gwt.i18n.client.DateTimeFormat; |
167,20 → 166,6 |
} |
return dateFormatee; |
} |
|
public String getAnneOuDateFondationFormatLong() { |
String dateFormatee = ""; |
String dateFondation = renvoyerValeurCorrecte("date_fondation"); |
if (!dateFondation.equals("")) { |
if (dateFondation.endsWith("00-00")) { |
dateFormatee = dateFondation.substring(0, 4); |
} else { |
Date date = DateTimeFormat.getFormat("yyyy-MM-dd").parse(dateFondation); |
dateFormatee = DateTimeFormat.getLongDateFormat().format(date); |
} |
} |
return dateFormatee; |
} |
public Date getDateFondation() { |
Date fondationDate = null; |
String fondationChaine = renvoyerValeurCorrecte("date_fondation"); |
189,17 → 174,6 |
} |
return fondationDate; |
} |
|
public String getAnneeOuDateFondation() { |
String valeurDateFondation = get("date_fondation"); |
if (!UtilString.isEmpty(valeurDateFondation) && valeurDateFondation.endsWith("00-00")) { |
valeurDateFondation = valeurDateFondation.substring(0, 4); |
} else if (UtilString.isEmpty(valeurDateFondation) && valeurDateFondation.equals("0000-00-00")) { |
valeurDateFondation = ""; |
} |
return valeurDateFondation; |
} |
|
public void setDateFondation(Date dateFondation) { |
if (dateFondation != null) { |
this.set("date_fondation", DateTimeFormat.getFormat("yyyy-MM-dd").format(dateFondation)); |