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