com.clra.web
Class FormattedDate
java.lang.Object
|
+--com.clra.web.FormattedDate
- All Implemented Interfaces:
- Serializable
- public class FormattedDate
- extends Object
- implements Serializable
A JSP bean that displays a formatted date. This class is a thin wrapper
around the Date and SimpleDateFormat classe. See the SimpleDateFormat
for how date formats are specified.
- Version:
- $Id: FormattedDate.java,v 1.2 2002/02/18 18:05:58 rphall Exp $
- Author:
SimpleDateFormat
, Serialized Form
Constructor Summary |
FormattedDate()
Constructs a formatted date the current system time with
DEFAULT_FORMAT |
FormattedDate(Date date)
Constructs a formatted date with the specified datetime
and DEFAULT_FORMAT |
FormattedDate(String format)
Constructs a formatted date with the current system time
and the specified format |
FormattedDate(String format,
Date date)
Constructs a formatted date with the specified datetime
and format. |
FormattedDate(String format,
Integer month,
Integer year)
Constructs a formatted date with the specified month (0-11), year
(four digits) and format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_FORMAT
public static final String DEFAULT_FORMAT
- Default format is "Tuesday, 10/28/99"
FormattedDate
public FormattedDate()
throws javax.servlet.jsp.JspException
- Constructs a formatted date the current system time with
DEFAULT_FORMAT
FormattedDate
public FormattedDate(String format)
throws javax.servlet.jsp.JspException
- Constructs a formatted date with the current system time
and the specified format
FormattedDate
public FormattedDate(Date date)
throws javax.servlet.jsp.JspException
- Constructs a formatted date with the specified datetime
and DEFAULT_FORMAT
FormattedDate
public FormattedDate(String format,
Date date)
throws javax.servlet.jsp.JspException
- Constructs a formatted date with the specified datetime
and format.
FormattedDate
public FormattedDate(String format,
Integer month,
Integer year)
throws javax.servlet.jsp.JspException
- Constructs a formatted date with the specified month (0-11), year
(four digits) and format.
applyFormat
public static String applyFormat(String fmt,
Date dt)
throws javax.servlet.jsp.JspException
- Utility that applies a format to a date
getDate
public Date getDate()
setDate
public void setDate(Date date)
throws javax.servlet.jsp.JspException
getFormat
public String getFormat()
setFormat
public void setFormat(String format)
throws javax.servlet.jsp.JspException
getValue
public String getValue()