Package rife.render

Class DateTimeIso

java.lang.Object
rife.render.DateTimeIso
All Implemented Interfaces:
ValueRenderer

public class DateTimeIso extends Object implements ValueRenderer

Renders the current date and time in ISO 8601 format.

Usage:

   <!--v render:rife.render.DateTimeIso/-->
   {{v render:rife.render.DateTimeIso/}}
 
Since:
1.0
Author:
Erik C. Thauvin
See Also:
  • Constructor Details

    • DateTimeIso

      public DateTimeIso()
  • Method Details

    • render

      public String render(Template template, String valueId, String differentiator)
      Renders the current date and time in ISO 8601 format.

      Additionally, it allows specifying a time zone through the template's default value properties with the key tz. If no time zone is specified, the system default time zone is used.

      Specified by:
      render in interface ValueRenderer
      Parameters:
      template - the template that is currently being rendered
      valueId - the id of the value to be rendered
      differentiator - a differentiator that may be used to differentiate the rendering of this value renderer
      Returns:
      the current date and time in ISO 8601 format