Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.clra.web
Class FormattedDate  view FormattedDate download FormattedDate.java

java.lang.Object
  extended bycom.clra.web.FormattedDate
All Implemented Interfaces:
java.io.Serializable

public class FormattedDate
extends java.lang.Object
implements java.io.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.3 2003/02/26 03:38:46 rphall Exp $

Field Summary
private  java.util.Date date
          Default date is the current system date/time
static java.lang.String DEFAULT_FORMAT
          Default format is "Tuesday, 10/28/99"
private  java.lang.String format
          Default format specification is specified by DEFAULT_FORMAT
private  java.lang.String value
          This member should cache the currently applied format/date.
 
Constructor Summary
FormattedDate()
          Constructs a formatted date the current system time with DEFAULT_FORMAT
FormattedDate(java.util.Date date)
          Constructs a formatted date with the specified datetime and DEFAULT_FORMAT
FormattedDate(java.lang.String format)
          Constructs a formatted date with the current system time and the specified format
FormattedDate(java.lang.String format, java.util.Date date)
          Constructs a formatted date with the specified datetime and format.
FormattedDate(java.lang.String format, java.lang.Integer month, java.lang.Integer year)
          Constructs a formatted date with the specified month (0-11), year (four digits) and format.
 
Method Summary
static java.lang.String applyFormat(java.lang.String fmt, java.util.Date dt)
          Utility that applies a format to a date
 java.util.Date getDate()
           
 java.lang.String getFormat()
           
 java.lang.String getValue()
           
 void setDate(java.util.Date date)
           
 void setFormat(java.lang.String format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FORMAT

public static final java.lang.String DEFAULT_FORMAT
Default format is "Tuesday, 10/28/99"

See Also:
Constant Field Values

date

private java.util.Date date
Default date is the current system date/time


format

private java.lang.String format
Default format specification is specified by DEFAULT_FORMAT


value

private java.lang.String value
This member should cache the currently applied format/date. See the constructors and setters.

Constructor Detail

FormattedDate

public FormattedDate()
              throws javax.servlet.jsp.JspException
Constructs a formatted date the current system time with DEFAULT_FORMAT


FormattedDate

public FormattedDate(java.lang.String format)
              throws javax.servlet.jsp.JspException
Constructs a formatted date with the current system time and the specified format


FormattedDate

public FormattedDate(java.util.Date date)
              throws javax.servlet.jsp.JspException
Constructs a formatted date with the specified datetime and DEFAULT_FORMAT


FormattedDate

public FormattedDate(java.lang.String format,
                     java.util.Date date)
              throws javax.servlet.jsp.JspException
Constructs a formatted date with the specified datetime and format.


FormattedDate

public FormattedDate(java.lang.String format,
                     java.lang.Integer month,
                     java.lang.Integer year)
              throws javax.servlet.jsp.JspException
Constructs a formatted date with the specified month (0-11), year (four digits) and format.

Method Detail

applyFormat

public static java.lang.String applyFormat(java.lang.String fmt,
                                           java.util.Date dt)
                                    throws javax.servlet.jsp.JspException
Utility that applies a format to a date


getDate

public java.util.Date getDate()

setDate

public void setDate(java.util.Date date)
             throws javax.servlet.jsp.JspException

getFormat

public java.lang.String getFormat()

setFormat

public void setFormat(java.lang.String format)
               throws javax.servlet.jsp.JspException

getValue

public java.lang.String getValue()