fix: datetime format in main page news list

This commit is contained in:
imperosol
2025-06-14 11:54:58 +02:00
parent 9d841cd606
commit c7e4de7df2
2 changed files with 10 additions and 6 deletions

View File

@ -84,11 +84,11 @@
<a href="{{ date.news.club.get_absolute_url() }}">{{ date.news.club }}</a>
<div class="news_date">
<time datetime="{{ date.start_date.isoformat(timespec="seconds") }}">
{{ date.start_date|localtime|date(DATETIME_FORMAT) }}
{{ date.start_date|localtime|date(DATETIME_FORMAT) }},
{{ date.start_date|localtime|time(DATETIME_FORMAT) }}
</time> -
<time datetime="{{ date.end_date.isoformat(timespec="seconds") }}">
{{ date.end_date|localtime|date(DATETIME_FORMAT) }}
{{ date.end_date|localtime|date(DATETIME_FORMAT) }},
{{ date.end_date|localtime|time(DATETIME_FORMAT) }}
</time>
</div>
@ -103,7 +103,7 @@
</div>
</div>
{% endfor %}
<div x-data="upcomingNewsLoader(new Date('{{ last_day + timedelta(days=1) }}'))">
<div x-data="upcomingNewsLoader(new Date('{{ last_day + timedelta(days=1) }}'), '{{ get_language() }}')">
<template x-for="newsList in Object.values(groupedDates())">
<div class="news_events_group">
<div class="news_events_group_date">
@ -139,11 +139,11 @@
<div class="news_date">
<time
:datetime="newsDate.start_date.toISOString()"
x-text="`${newsDate.start_date.getHours()}:${newsDate.start_date.getMinutes()}`"
x-text="dateFormat.format(newsDate.start_date)"
></time> -
<time
:datetime="newsDate.end_date.toISOString()"
x-text="`${newsDate.end_date.getHours()}:${newsDate.end_date.getMinutes()}`"
x-text="dateFormat.format(newsDate.end_date)"
></time>
</div>
</div>