Skip to content
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

fix: use locale datetime on full dates #2442

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rmtsrc
Copy link

@rmtsrc rmtsrc commented Oct 20, 2024

Different countries use different date formats, for example US: MM/DD/YYYY EU: DD/MM/YYYY.

Using moment.format('L') only outputs in the US date format.

This PR changes the output to use the built in toLocaleDateString method which will use the correct date format based on the users system locale settings:

Before (in the EU):

Dates were in US format:
Screenshot from 2024-10-20 17-36-46

After (in the EU):

Dates are in EU format:
Screenshot from 2024-10-20 17-54-44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant