Class JSDateTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class JSDateTag extends JSTag
A JSP Tag to format a Date/Time object into a JavaScript date.
Since:
2.4
Version:
9.1
Author:
Luke
See Also:
  • Constructor Details

    • JSDateTag

      public JSDateTag()
  • Method Details

    • setDate

      public void setDate(ZonedDateTime dt)
      Sets the date/time to format.
      Parameters:
      dt - the date/time
    • setTime

      public void setTime(boolean doTime)
      Sets whether the time component of the date should be used.
      Parameters:
      doTime - TRUE if the time should be included, otherwise FALSE
    • release

      public void release()
      Specified by:
      release in interface Tag
      Overrides:
      release in class JSTag
    • doEndTag

      public int doEndTag() throws JspException
      Renders the JavaScript date to the JSP output stream.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Returns:
      EVAL_PAGE always
      Throws:
      JspException - if an error occurs