xq.gwt.mvc.server.ServerDateFormatter 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.server;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import xq.gwt.mvc.util.DateFormatter;
public class ServerDateFormatter implements DateFormatter {
@Override
public String format(Date val, String format) {
DateFormat df = new SimpleDateFormat(format);
return df.format(val);
}
@Override
public Date parse(String val, String format) throws Exception {
DateFormat df = new SimpleDateFormat(format);
Date dateVal = df.parse(val);
return dateVal;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy