title: Thymeleaf and using LocalDate class with methods
body: <p>Hi I have a SpringBoot application which has a Timesheet class, which has a LocalDate date = LocalDate.now(); declaration. I have a ThymeLeaf page which has the three declarations like this:</p>
  <pre><code>&lt;span th:if=&quot;${timesheet.id == 0} AND ${#temporals.format(timesheet.localDate.now(), 'dd-MM-yyyy')}&quot; class=&quot;missing&quot;&gt;MISSING&lt;/span&gt;
      &lt;span th:unless=&quot;${timesheet.id == 0}&quot; class=&quot;draft&quot;&gt;DRAFT&lt;/span&gt;&lt;/td&gt;
      &lt;span th:unless=&quot;${timesheet.id == 0}&quot; AND &quot;${#temporals.format(timesheet.date.plusDays(7}, 'dd-MM-yyyy')}&quot; class=&quot;available&quot;&gt;AVAILABLE&lt;/span&gt;&lt;/td&gt;
      &lt;span th:unless=&quot;${timesheet.id != 0}&quot; AND &quot;${#temporals.format(timesheet.date.minusDays(10), 'dd-MM-yyyy')}&quot; class=&quot;overdue&quot;&gt;OVERDUE&lt;/span&gt;&lt;/td&gt;
  
  </code></pre>
  <p>I am checking for that the timesheet.id == 0, then I want to display the date for certain conditions for instance, an Overdue timesheet, is when the timesheet.date is 10 days old. I'm using an AND clause to join the conditions, but I get a parsing error, which is in red, for Visual Studio Code, my question is how do I accomplish testing for the condition, and displaying the correct formatted date?</p>
  <p>Thanks for your help</p>
  <p>MindGames</p>