xq.gwt.mvc.util.DefaultDateFormatter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of XqGwtMvc Show documentation
Show all versions of XqGwtMvc Show documentation
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