Subversion Repositories eFlore/Applications.coel

Rev

Go to most recent revision | Details | 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
	}
1845 aurelien 19
 
20
	public static String formaterEnStringFormatFr(Date date)	{
21
		String dateChaine = "0000-00-00";
22
		if (date != null) {
23
			dateChaine = formatDateFr.format(date);
24
		}
25
		return dateChaine;
26
	}
954 jpm 27
}