Relative date format issue

the relative date in Chinese language has unnecessary spaces,
usually the date format should be “mm月dd日”, the current format is “mm月 dd 日”,
I haven’t found any issue with the translation, and also I think the ember helper lead to this issue

I think function autoUpdatingRelativeAge adds the extra spaces.
I understand this is not an issue for English version discourse, but may cause some format issues for other languages.
I tried javascript to remove the spaces, but it won’t work with the lazy loading content.
I’m appreciated to any tips for modifying the ember helper in a plugin or any fix from the main branch.

This seems to be a bug with simplified chinese caused by the date format strings in the locale files. Looking at the git history, in v3.3.0, the format is:

It looks like they were updated recently to (confirmed live in 3.4.0.beta1-dev)

Testing the format string "MMM D 日" against with the default Momentjs config for zh-cn in a codepen, it is producing the observed defect (ie "8月 2 日")

For immediate fix, you can change the format via the translation for js.dates.tiny.date_month and js.dates.long_no_year_no_time as so:

2 Likes