Merge pull request #967 from bookwyrm-social/date-localization

Fixes localization weirdness with dates
This commit is contained in:
Mouse Reeve
2021-04-20 13:44:34 -07:00
committed by GitHub
5 changed files with 4 additions and 55 deletions

View File

@ -1,6 +1,7 @@
{% spaceless %}
{% load i18n %}
{% load humanize %}
<p>
{% with format=book.physical_format pages=book.pages %}
@ -39,7 +40,7 @@
{% endif %}
<p>
{% with date=book.published_date|date:'M jS Y' publisher=book.publishers|join:', ' %}
{% with date=book.published_date|naturalday publisher=book.publishers|join:', ' %}
{% if date or book.first_published_date %}
<meta
itemprop="datePublished"

View File

@ -123,7 +123,7 @@
{% include 'snippets/status_preview.html' with status=related_status %}
</div>
<div class="column is-narrow {% if notification.notification_type == 'REPLY' or notification.notification_type == 'MENTION' %}has-text-black{% else %}has-text-grey-dark{% endif %}">
{{ related_status.published_date | post_date }}
{{ related_status.published_date|timesince }}
{% include 'snippets/privacy-icons.html' with item=related_status %}
</div>
</div>

View File

@ -65,7 +65,7 @@
</div>
<div class="card-footer-item">
<a href="{{ status.remote_id }}">{{ status.published_date | post_date }}</a>
<a href="{{ status.remote_id }}">{{ status.published_date|timesince }}</a>
</div>
{% if not moderation_mode %}
<div class="card-footer-item">