spring boot 整合thyemleaf基本使用 日期的操作(三)

<!--格式化日期,默认的以浏览器默认语言为格式化标准-->
<span th:text="${#dates.format(key)}"></span>
<hr/>
<!--自定义格式-->
<span th:text="${#dates.format(key,'yy/mm/dd')}"></span>
<hr/>
<!--取年,月,日-->
<span th:text="${#dates.year(key)}"></span>
<hr/>
<span th:text="${#dates.month(key)}"></span>
<hr/>
<span th:text="${#dates.day(key)}"></span>
<hr/>

猜你喜欢

转载自blog.csdn.net/qq_40979622/article/details/83105683