All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xq.gwt.mvc.util.DefaultDateFormatter Maven / Gradle / Ivy

Go to download

A framework for implementing the MVP variant of the Model View Controller design pattern in the context of GWT

The newest version!
package xq.gwt.mvc.util;

import java.util.Date;

import com.google.gwt.i18n.client.DateTimeFormat;

public class DefaultDateFormatter implements DateFormatter {

	@Override
	public String format(Date val, String format){
		DateTimeFormat df = DateTimeFormat.getFormat(format);
	    return df.format(val);
		
	}

	@Override
	public Date parse(String val, String format) throws Exception{
		DateTimeFormat df = DateTimeFormat.getFormat(format);
        Date dateVal =  df.parse(val);
		return dateVal;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy