wrong months in 'last months' stats
This commit is contained in:
parent
61a7f2df1e
commit
947de3b638
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue