Class ManipulateTimeDirective

java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.directives.ManipulateTimeDirective
All Implemented Interfaces:
Nice2TemplateDirective, freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

public class ManipulateTimeDirective extends Object implements Nice2TemplateDirective
Directive for FreemarkerEngine to add days to a date.

Parameters available in template:

  • date (required): date which will be increased
  • field (required): field of what should be done to the date
  • amount (required): amount which will be added to date
  • pattern (optional): pattern for the output
  • name (optional): new variable to save
  • Field Summary

    Fields inherited from interface freemarker.template.TemplateModel

    NOTHING
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] templateModels, freemarker.template.TemplateDirectiveBody templateDirectiveBody)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ManipulateTimeDirective

      public ManipulateTimeDirective()
  • Method Details

    • execute

      public void execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] templateModels, freemarker.template.TemplateDirectiveBody templateDirectiveBody) throws freemarker.template.TemplateException, IOException
      Specified by:
      execute in interface freemarker.template.TemplateDirectiveModel
      Throws:
      freemarker.template.TemplateException
      IOException