-
-
Notifications
You must be signed in to change notification settings - Fork 264
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 post dates being inconsistent #3437
base: main
Are you sure you want to change the base?
Conversation
Makes all dates fixed except if in the last day, in which case they are relative times. Fixes bookwyrm-social#3365
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.
Thanks for investigating! The fix looks good to me.
We should perhaps consider changing "M j"
to "MONTH_DAY_FORMAT"
?, since the former is not localized. (Not necessarily in this PR!)
(Though at the same time, the change would worsen the English localisation, since abbreviated months sound appropriate for status timestamps. MONTH_DAY_FORMAT
uses full month names in English.)
Ah, I did think about that but wasn't sure how to do locale-specific dates. This is a good solution and admins can override the default. I'll update the PR shortly. |
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.
Great, thank you!
If you’d like, you can squash this test into your PR: hughrun#5
(I have a branch with extended tests for get_published_date, but I’m having errors mocking datetime.now(), so I’ll send them in a separate PR later.)
Makes all dates fixed except if in the last day, in which case they are relative times.
Prior to this if a post was published on the same day of the month as today, the date was shown as relative (e.g. "10 months ago").
Description
What type of Pull Request is this?
Does this PR change settings or dependencies, or break something?
Details of breaking or configuration changes (if any of above checked)
Documentation
Tests