wrong months in 'last months' stats

This commit is contained in:
Qwann 2017-01-20 21:21:51 +01:00
parent 61a7f2df1e
commit 947de3b638

View file

@ -55,7 +55,7 @@ def lastmonths(nb):
this_year = first_month_day.year
this_month = first_month_day.month
for i in range(1, nb+1):
month = this_month - (nb - i) % 12
month = ((this_month - 1 - (nb - i)) % 12) + 1
year = this_year + (nb - i) // 12
first_days[i] = timezone.datetime(year=year,
month=month,