freemarker.template
public class SimpleDate extends Object implements TemplateDateModel
This class is thread-safe.
DATE, DATETIME, TIME, TYPE_NAMES, UNKNOWNNOTHING| 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.
|
public SimpleDate(Date date)
public SimpleDate(Time time)
public SimpleDate(Timestamp datetime)
public SimpleDate(Date date, int type)
public Date getAsDate()
TemplateDateModelgetAsDate in interface TemplateDateModelDate instance associated with this date model.public int getDateType()
TemplateDateModelgetDateType in interface TemplateDateModel