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

St 488 remove one minute 1 hour etc with timestamp #424

Merged
merged 2 commits into from
Jun 8, 2023

Conversation

mwmerz
Copy link
Contributor

@mwmerz mwmerz commented Jun 7, 2023

  • replace ToNow component with DateTimeRenderer

@mwmerz mwmerz requested a review from terran6 June 7, 2023 21:43
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 08c08ec
Status: ✅  Deploy successful!
Preview URL: https://fbc20951.station-1a1.pages.dev
Branch Preview URL: https://st-488-remove-one-minute-1-h.station-1a1.pages.dev

View logs

Copy link
Contributor

@terran6 terran6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MM/DD/YYYY is a very rare date format that is used in the USA and a few other countries. Consider utilizing a date format of something like May 29, 2023 or some other internationally accepted date format (ISO standard). Furthermore, we should evaluate if we would like to cut off the seconds from the time. 4:09 PM versus 4:09:12 PM.

Example of current display:
Submitted 5/29/2023, 4:09:12 PM

@mwmerz
Copy link
Contributor Author

mwmerz commented Jun 8, 2023

The formatting I am using here is new Date(dateString).toLocaleString() (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString)

That will produce a localized date string based on your system's settings. If you're showing a US time format, it's possible that you have your machine set to do that.

An abstract time renderer component was created to make this change very easy, however. If we decide to use one single time stamp, ISO 8601 is the international standard.

@mwmerz mwmerz merged commit 97b6dd1 into staging Jun 8, 2023
@mwmerz mwmerz deleted the ST-488-remove-one-minute-1-hour-etc-with-timestamp branch June 8, 2023 15:56
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