Subversion Repositories eFlore/Applications.coel

Rev

Rev 954 | Rev 1415 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
954 jpm 1
package org.tela_botanica.client.util;
2
 
3
import java.util.Date;
4
 
5
import com.google.gwt.i18n.client.DateTimeFormat;
6
 
7
public class UtilDate {
8
 
975 jpm 9
	public  final static DateTimeFormat formatDateMysql = DateTimeFormat.getFormat("yyyy-MM-dd");
10
	public  final static DateTimeFormat formatDateFr = DateTimeFormat.getFormat("dd/MM/yyyy");
11
 
954 jpm 12
	public static String formaterEnString(Date date)	{
13
		String dateChaine = "0000-00-00";
14
		if (date != null) {
975 jpm 15
			dateChaine = formatDateMysql.format(date);
954 jpm 16
		}
17
		return dateChaine;
18
	}
19
}