public interface TemplateDateModel extends TemplateModel
Date
. Contrary to Java,
FreeMarker distinguishes date (no time part), time and date-time values.
Objects of this type should be immutable, that is, calling getAsDate()
and getDateType()
should
always return the same value as for the first time.
Modifier and Type | Field and Description |
---|---|
static int |
DATE
The date model represents a date value (no time part).
|
static int |
DATETIME
The date model represents a date-time value (also known as timestamp).
|
static int |
TIME
The date model represents a time value (no date part).
|
static java.util.List |
TYPE_NAMES |
static int |
UNKNOWN
It is not known whether the date represents a date, a time, or a date-time value.
|
NOTHING
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getAsDate()
Returns the date value.
|
int |
getDateType()
Returns the type of the date.
|
static final int UNKNOWN
static final int TIME
static final int DATE
static final int DATETIME
static final java.util.List TYPE_NAMES
java.util.Date getAsDate() throws TemplateModelException
null
.TemplateModelException
int getDateType()