【发布时间】:2016-08-24 12:44:09
【问题描述】:
我读过一些像this one 这样的好帖子,其中解释了在给定int 时接收序数的方法。
现在,我有一个 LocalDate 对象,我可以使用 Thymeleaf 模板中的任何 DateTimeFormat 模式来格式化我的日期。示例如下:
<strong th:text="${item.date} ? ${#temporals.format(item.date, 'dd')}"></strong>
问题:我怎样才能获得与 Thymeleaf 中的 post I linked to above 类似的结果,或者最好的方法是什么。
我不是一位经验丰富的 Java 开发人员,因此如果您尽可能详尽地解释答案,将会非常有帮助。
【问题讨论】:
标签: java spring-boot thymeleaf datetime-format