|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TemplateDateModel
Date values in a template data model must implement this interface. Contrary to Java, FreeMarker actually distinguishes values that represent only a time, only a date, or a combined date and time. All three are represented using this single interface, however there's a method that
Field Summary | |
---|---|
static int |
DATE
The date model represents a date-only value. |
static int |
DATETIME
The date model represents a datetime value. |
static int |
TIME
The date model represents a time-only value. |
static java.util.List |
TYPE_NAMES
|
static int |
UNKNOWN
It is not known whether the date model represents a time-only, a date-only, or a datetime value. |
Fields inherited from interface freemarker.template.TemplateModel |
---|
NOTHING |
Method Summary | |
---|---|
java.util.Date |
getAsDate()
Returns the date value. |
int |
getDateType()
Returns the type of the date. |
Field Detail |
---|
static final int UNKNOWN
static final int TIME
static final int DATE
static final int DATETIME
static final java.util.List TYPE_NAMES
Method Detail |
---|
java.util.Date getAsDate() throws TemplateModelException
Date
instance associated with this date model.
TemplateModelException
int getDateType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |