Package freemarker.template
Class SimpleDate
java.lang.Object
freemarker.template.SimpleDate
- All Implemented Interfaces:
- TemplateDateModel,- TemplateModel
A simple implementation of the 
TemplateDateModel
 interface. Note that this class is immutable.
 This class is thread-safe.
- 
Field SummaryFields inherited from interface freemarker.template.TemplateDateModelDATE, DATETIME, TIME, TYPE_NAMES, UNKNOWNFields inherited from interface freemarker.template.TemplateModelNOTHING
- 
Constructor SummaryConstructorsConstructorDescriptionSimpleDate(Date date)Creates a new date model wrapping the specified date object and having DATE 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.SimpleDate(Date date, int type)Creates a new date model wrapping the specified date object and having the specified type.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the date value.intReturns the type of the date.toString()
- 
Constructor Details- 
SimpleDateCreates a new date model wrapping the specified date object and having DATE type.
- 
SimpleDateCreates a new date model wrapping the specified time object and having TIME type.
- 
SimpleDateCreates a new date model wrapping the specified time object and having DATETIME type.
- 
SimpleDateCreates a new date model wrapping the specified date object and having the specified type.
 
- 
- 
Method Details- 
getAsDateDescription copied from interface:TemplateDateModelReturns the date value. The return value must not benull.- Specified by:
- getAsDatein interface- TemplateDateModel
 
- 
getDateTypepublic int getDateType()Description copied from interface:TemplateDateModelReturns the type of the date. It can be any ofTemplateDateModel.TIME,TemplateDateModel.DATE, orTemplateDateModel.DATETIME.- Specified by:
- getDateTypein interface- TemplateDateModel
 
- 
toString
 
-