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

Format numbers and dates per region #157

Merged
merged 5 commits into from
Oct 20, 2024
Merged

Conversation

neeleshpoli
Copy link
Contributor

@neeleshpoli neeleshpoli commented Oct 20, 2024

This PR formats dates and numbers to be formatted for each locale correctly. This also converts times to the user's respective time zone.

This introduces 2 new Vue components, FmtNum and FmtDateTime. These can be used as normal Vue components in the markdown files.

For example, here is en_US:

image

And here is de-DE

image

Here is a US formatted date, in the CDT time zone:

image

And here is a London formatted date

image

Everything is adjusted based on region, using the Intl JavaScript apis. To be clear, there is no actual translation. Only the numbers and dates are formatted as per the user region.

Also, there are improvements to the benchmarking page so that it flows more smoothly.

@Snowiiii
Copy link
Collaborator

Overall good job, One thing i would change are the Notes
image
It is very irritating to have like 3 Warn sings at once

@Snowiiii
Copy link
Collaborator

Now its better.
Thank you @neeleshpoli

@Snowiiii Snowiiii merged commit b7ac8ad into Pumpkin-MC:master Oct 20, 2024
7 of 8 checks passed
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.

2 participants