[Tbase-cvs] applications/adfundum/src/adfundum/view/components AFDate.java,NONE,1.1
Status: Alpha
Brought to you by:
ron_bakker
|
From: Jan A. B. <jab...@us...> - 2006-03-28 19:04:06
|
Update of /cvsroot/tbase/applications/adfundum/src/adfundum/view/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4911/src/adfundum/view/components Added Files: AFDate.java Log Message: --- NEW FILE: AFDate.java --- package adfundum.view.components; import java.io.IOException; import java.util.Date; import java.util.Hashtable; import java.text.SimpleDateFormat; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.tbase.html.TemplateParser; public class AFDate extends TemplateParser { public void doRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { Hashtable<String, String> fields = new Hashtable<String, String>(); Date today = new Date(); SimpleDateFormat formatter; formatter = new SimpleDateFormat("EEE"); fields.put("day", formatter.format(today)); formatter = new SimpleDateFormat("d"); fields.put("date", formatter.format(today)); formatter = new SimpleDateFormat("MMM"); fields.put("month", formatter.format(today)); setFields(fields); parsePart("date"); } } |