mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 11:40:42 +00:00
Yet another attempt to calculate the number of months for Statistics page monthly view
This commit is contained in:
parent
6fcc4e9af1
commit
3f42053a1d
@ -1069,8 +1069,7 @@ QString Statistics::GenerateCPAPUsage()
|
||||
int firstMonth = firstcpap.month();
|
||||
int lastMonth = lastcpap.month();
|
||||
int years = lastcpap.year() - firstcpap.year();
|
||||
if (lastMonth <= firstMonth)
|
||||
lastMonth += (12 * years); // handle time extending to next year
|
||||
lastMonth += (12 * years); // handle time extending to next year
|
||||
number_periods = lastMonth - firstMonth + 1;
|
||||
|
||||
if (number_periods < 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user