Subversion Repositories eFlore/Applications.coel

Rev

Rev 954 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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