-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Switch FormattedDate component to Intl.DateTimeFormat #8276
feat: Switch FormattedDate component to Intl.DateTimeFormat #8276
Conversation
Maybe should consider adding an end to end test or unit tests to make sure this does not break again |
@KuSh I see many stylistic changes that do not completely conform with our codebase. Do you mind removing the stylistic changes so the PR is clearer? |
Sure, I tried to configure prettier to follow you codebase / eslint but it seems I didn't succeed :/ |
845efaf
to
80a06ae
Compare
@larkox I've removed stylistic changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Only some minor changes needed.
35a4ba5
to
723b55b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you very much for the changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @KuSh for making the changes. And participate in the healthy discussion. Just like others, I've learned a bit more about internalization. I really appreciate all your contributions.
I have a request for change on the implementation and another request for improvement on the test. Both are not required.
@rahimrahman I've pushed the requested changes! |
Summary
Use Intl.DateTimeFormat instead of fixed momentjs format in FormattedDate component
This comes from a discussion in i18n - Localization channel in mattermost community where Ian Liu reported bad date formatting for Chinese and Japanese languages. After some digging it appeared there were more problems than that and I suggested to switch from momentjs to Intl.DateTimeFormat
Ticket Link
Checklist
E2E iOS tests for PR
.Device Information
This PR was tested on: Android Emulator - Nexus 8 API 31 and OnePlus 6 running /e/OS 2.4.1-t
Screenshots
Release Note