podverse-web
podverse-web copied to clipboard
Translation: date and date time formats are not localized
Describe the bug Date and DateTime formats are not localized (at least for pt-BR).
To Reproduce Steps to reproduce the behavior:
- Go to a page where a date or date time is displayed in pt-BR.
- See the format.
Expected behavior
Dates are expected to be displayed in format d/m/Y and date time in d/m/Y H:i.
*m Month can be displayed as number or as localized string.
Examples of valid formats for pt-BR:
- date
25/set/2020- short format25/setembro/2020-> regular format25 de setembro de 2020-> expanded format
- time
20:01(without seconds) - regular format20:01:22- regular format20h01m22s- alternative format
We may have to check which format fits better on each app place :)
** I think we don't have to display seconds for
Screenshots


I just remembered that my operating system is in English, and I'm using USA formats. 😅
Until tomorrow, I will check how the website is displayed on my wife's laptop. She uses Brazilian format.
Bug confirmed.
I accessed podverse website from a Windows in Brazilian Portuguese – including number/date formats.
@xthiago thanks for opening this. Would you be able to work on this? I believe we just need to add conditional format change when the lang is pt-br in this function: https://github.com/podverse/podverse-web/blob/develop/src/lib/utility/date.ts#L18
I can make the code change myself if you could confirm what the moment format needs to be.
Would you be able to work on this?
Yes. I can work with this issue on the weekend. Then I'm able to test different formats to pick the one who fits perfectly in each page.