public class SimpleDate extends java.lang.Object implements TemplateDateModel
This class is thread-safe.
DATE, DATETIME, TIME, TYPE_NAMES, UNKNOWN
NOTHING
Constructor and Description |
---|
SimpleDate(java.sql.Date date)
Creates a new date model wrapping the specified date object and
having DATE type.
|
SimpleDate(java.util.Date date,
int type)
Creates a new date model wrapping the specified date object and
having the specified type.
|
SimpleDate(java.sql.Time time)
Creates a new date model wrapping the specified time object and
having TIME type.
|
SimpleDate(java.sql.Timestamp datetime)
Creates a new date model wrapping the specified time object and
having DATETIME type.
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getAsDate()
Returns the date value.
|
int |
getDateType()
Returns the type of the date.
|
java.lang.String |
toString() |
public SimpleDate(java.sql.Date date)
public SimpleDate(java.sql.Time time)
public SimpleDate(java.sql.Timestamp datetime)
public SimpleDate(java.util.Date date, int type)
public java.util.Date getAsDate()
TemplateDateModel
null
.getAsDate
in interface TemplateDateModel
public int getDateType()
TemplateDateModel
TemplateDateModel.TIME
,
TemplateDateModel.DATE
, or TemplateDateModel.DATETIME
.getDateType
in interface TemplateDateModel
public java.lang.String toString()
toString
in class java.lang.Object