Fix month display on statistics page

This commit is contained in:
Andrew Smirnov 2021-05-13 19:55:21 +03:00
parent 5f88a4f297
commit 23eb2bf2ec
No known key found for this signature in database
GPG Key ID: 0EFE318E5BB2A82A
2 changed files with 2 additions and 2 deletions

View File

@ -373,7 +373,7 @@ class StatisticData:
for key, value in stat.items(): for key, value in stat.items():
current_month_start = max(self.start_date, date(year=key.year, month=key.month, day=1)) current_month_start = max(self.start_date, date(year=key.year, month=key.month, day=1))
current_month_end = min(self.end_date, last_day_of_month(date(year=key.year, month=key.month, day=1))) current_month_end = min(self.end_date, last_day_of_month(date(year=key.year, month=key.month, day=1)))
index = ' - '.join([str(current_month_start), str(current_month_end)]) index = (current_month_start, current_month_end)
if new_stat.get(index): if new_stat.get(index):
new_stat[index] += value new_stat[index] += value
else: else:

View File

@ -91,7 +91,7 @@
{% if interval == 'days' %} {% if interval == 'days' %}
<td scope="col">{{ date | date:'d.m' }}</td> <td scope="col">{{ date | date:'d.m' }}</td>
{% else %} {% else %}
<td scope="col">{{ date }}</td> <td scope="col">{{ date.1 | date:'F' }}</td>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</tr> </tr>