Thymeleaf: Use #dates.format() function for format date with internatinalization.

前端 未结 1 1381
遇见更好的自我
遇见更好的自我 2020-12-31 15:53

I am using Thymeleaf #dates.format() function for format date in view layer. I create one internatinalization properties file for pic the date format. i am usin

相关标签:
1条回答
  • 2020-12-31 16:54

    You should use this syntax instead :

    ${#dates.format(date, #messages.msg('app.dateformat'))}
    

    #messages : utility methods for obtaining externalized messages inside variables expressions, in the same way as they would be obtained using #{...} syntax.

    Source

    0 讨论(0)
提交回复
热议问题