-
Notifications
You must be signed in to change notification settings - Fork 578
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
Conversation
All contributors have signed the CLA ✍️ ✅ |
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.
❌ Changes requested. Reviewed everything up to bf8ef49 in 27 seconds
More details
- Looked at
63
lines of code in2
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.
I have read the CLA Document and I hereby sign the CLA |
Thanks for the PR, we will review shortly |
f85cf46
to
2c5d07f
Compare
618b4a5
to
820a454
Compare
I noticed that the time formats are hardcoded:
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
inutils.ts
to use locale-specific formatting, affecting date display in+page.svelte
.displayDate()
inutils.ts
to useIntl.DateTimeFormatOptions
for locale-specific date and time formatting.displayDate()
to handle invalid dates usingNumber.isNaN()
.+page.svelte
to use updateddisplayDate()
for displayingedited_at
with locale-specific formatting.utils.ts
and+page.svelte
for consistency.This description was created by for bf8ef49. It will automatically update as commits are pushed.