hugo-fixit / FixIt

🔧 A clean, elegant but advanced blog theme for Hugo 一个简洁、优雅且高效的 Hugo 主题
https://fixit.lruihao.cn
MIT License
769 stars 106 forks source link

Use dateFormat function to render localized dates #355

Closed stefanoginobili closed 1 year ago

stefanoginobili commented 1 year ago

This PR fixes the date not being rendered honoring the content localization.

🪲 Found bug

The dates were rendered using the .Format function which does not follow the content localization. Example: the date 2023-06-07 was rendered as "7 June 2023" inside an Italian content.

✅ Applied fix

The fix replaces the .Format function with the dateFormat one, which respects the page localization. Going on with the example above, the Italian content now renders the same date as "7 giugno 2023" which is the expected output.

vercel[bot] commented 1 year ago

@stefanoginobili is attempting to deploy a commit to the FixIt Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fixit ❌ Failed (Inspect) Sep 3, 2023 3:57am