Home » freemarker-2.3.13 » freemarker.template » [javadoc | source]
freemarker.template
public interface: TemplateDateModel [javadoc | source]

All Implemented Interfaces:
    TemplateModel

All Known Implementing Classes:
    SimpleDate, DateModel, DateParser

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
public static final  int UNKNOWN    It is not known whether the date model represents a time-only, a date-only, or a datetime value. 
public static final  int TIME    The date model represents a time-only value. 
public static final  int DATE    The date model represents a date-only value. 
public static final  int DATETIME    The date model represents a datetime value. 
public static final  List TYPE_NAMES     
Method from freemarker.template.TemplateDateModel Summary:
getAsDate,   getDateType
Method from freemarker.template.TemplateDateModel Detail:
 public Date getAsDate() throws TemplateModelException
    Returns the date value. The return value must not be null.
 public int getDateType()
    Returns the type of the date. It can be any of TIME, DATE, or DATETIME.