Class DateCompareMethod
- java.lang.Object
-
- org.springframework.extensions.webscripts.DateCompareMethod
-
- All Implemented Interfaces:
freemarker.template.TemplateMethodModel,freemarker.template.TemplateMethodModelEx,freemarker.template.TemplateModel
public class DateCompareMethod extends java.lang.Object implements freemarker.template.TemplateMethodModelEx- Author:
- Kevin Roast
Custom FreeMarker Template language method.
Perform a test to see how two dates compare, optionally offset by a specified number of milliseconds.
Usage: dateCompare(dateA, dateB) - 1 if dateA if greater than dateB dateCompare(dateA, dateB, millis) - 1 if dateA is greater than dateB by at least millis, else 0 dateCompare(dateA, dateB, millis, test) - same as above, but the 'test' variable is one of the following strings ">", "<", "==" - greater than, less than or equal - as the test to perform.
-
-
Constructor Summary
Constructors Constructor Description DateCompareMethod()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectexec(java.util.List args)
-
-
-
Method Detail
-
exec
public java.lang.Object exec(java.util.List args) throws freemarker.template.TemplateModelException- Specified by:
execin interfacefreemarker.template.TemplateMethodModel- Specified by:
execin interfacefreemarker.template.TemplateMethodModelEx- Throws:
freemarker.template.TemplateModelException- See Also:
TemplateMethodModel.exec(java.util.List)
-
-