title: Comparing two dates in JSP
body: <p>I know this could be a basic question but i have been stuck on this for hours. What i am trying to do is a comparing two dates in JSP and if the following equals each other do the follow.</p>
  
  <pre><code>    &lt;%
          if(!viewBean.isHiddenEndDate())
          {
              (reportVO.getEndDate().getYear() == 9999 &amp;&amp; reportVO.getEndDate().getMonth() == 12 &amp;&amp; reportVO.getEndDate().getDate() == 31);
      %&gt;
          &lt;td headers="EndDate&lt;%=localizationHelper.getContentString(reportVO.getLocalizedTypeLabel())%&gt;"&gt;"Until terminated"&lt;/td&gt;
      &lt;%  }else{ %&gt;
          &lt;td headers="EndDate"&gt;&lt;%=localizationHelper.formatDate(reportVO.getEndDate())%&gt;&lt;/td&gt;
      &lt;%
      }
      %&gt;
  </code></pre>
  
  <p>However when i do this, mySyntax error, insert <code>AssignmentOperator Expression</code> to complete Assignment and Syntax error, insert <code>;</code> to complete BlockStatements.</p>
  
  <p>Thanks.</p>