Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1283 → Rev 1284

/trunk/src/org/tela_botanica/client/modeles/structure/Structure.java
6,6 → 6,7
 
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;
166,6 → 167,20
}
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");
174,6 → 189,17
}
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));