In thimeleaf, it looks something like this:
Controller:
// Create these dates however you want, these example dates are filtering between 1950 and 1960. GregorianCalendar gc = new GregorianCalendar(); gc.set(Calendar.YEAR, 1950); model.put("start", gc.getTime()); gc.set(Calendar.YEAR, 1960); model.put("end", gc.getTime());
Thymeleaf:
<table class="table table-bordered" id="expiredUsersTable" dt:table="true"> <thead> <tr> <th dt:sortInitDirection="desc">TIME</th> <th dt:filterable="true" dt:filterType="select">Log Level</th> <th>Message</th> </tr> </thead> <tbody> <tr th:each="log : ${logs}" th:unless="${log.date.before(start) OR log.date.after(end)}"> <td th:text="${log?.formattedDate}"></td> <td th:text="${log?.level}"></td> <td th:text="${log?.message}"></td> </tr> </tbody> </table>
source share