I have the following JSP code and would like to add a second column for the difference in months between the current date and the first column. The List of ${items} is mapped in the Controller, which is calling the corresponding DAO method. Is there a way to do the calculation in the JSP file?
<table class="table">
<thead>
<tr>
<th>First Date</th>
<th>Months</th>
</tr>
</thead>
<tbody>
<c:forEach items="${items}" var="item">
<tr>
<td><fmt:formatDate value="${item.firstDate}" pattern="yyyy-MM-dd"/></td>
<td>"Here should be the difference in months between the current date and firstDate"</td>
</tr>
</c:forEach>
</tbody>
</table>
Thank you!