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

Update displayDate to use local time format preferences #4826

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

mzhang28
Copy link
Contributor

@mzhang28 mzhang28 commented Dec 1, 2024

I noticed that the time formats are hardcoded:

image

In my local timezone, this should be displayed as 11/30 6:16 PM.

I've rewritten it to just use the date/time options provided by Intl.DateTimeFormatOptions, so it will respect the locale time display format.

Let me know if there is a design for this that works better!


Important

Update displayDate in utils.ts to use locale-specific formatting, affecting date display in +page.svelte.

  • Behavior:
    • Update displayDate() in utils.ts to use Intl.DateTimeFormatOptions for locale-specific date and time formatting.
    • Adjusts displayDate() to handle invalid dates using Number.isNaN().
  • UI:
    • Modify +page.svelte to use updated displayDate() for displaying edited_at with locale-specific formatting.
  • Misc:
    • Minor code style adjustments in utils.ts and +page.svelte for consistency.

This description was created by Ellipsis for bf8ef49. It will automatically update as commits are pushed.

@mzhang28 mzhang28 requested a review from rubenfiszel as a code owner December 1, 2024 04:48
Copy link
Contributor

github-actions bot commented Dec 1, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to bf8ef49 in 27 seconds

More details
  • Looked at 63 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_X6Rp6GtC4JImsb4Z


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

frontend/src/lib/utils.ts Outdated Show resolved Hide resolved
@mzhang28
Copy link
Contributor Author

mzhang28 commented Dec 1, 2024

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 1, 2024
@rubenfiszel
Copy link
Contributor

Thanks for the PR, we will review shortly

@rubenfiszel rubenfiszel force-pushed the main branch 6 times, most recently from f85cf46 to 2c5d07f Compare December 9, 2024 17:02
@rubenfiszel rubenfiszel force-pushed the main branch 9 times, most recently from 618b4a5 to 820a454 Compare December 15, 2024 13:14
@rubenfiszel rubenfiszel merged commit d391930 into windmill-labs:main Dec 16, 2024
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants