reveted back to add years
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
de30a72c4e
commit
ec32618e11
@ -105,9 +105,9 @@ QString JsonCatPack::path()
|
||||
QDate endDate = ensureDay(now.year(), var.endTime.month, var.endTime.day);
|
||||
if (startDate > endDate) { // it's spans over multiple years
|
||||
if (endDate <= now) // end date is in the past so jump one year into the future for endDate
|
||||
endDate = ensureDay(now.year() + 1, var.endTime.month, var.endTime.day);
|
||||
endDate = endDate.addYears(1);
|
||||
else // end date is in the future so jump one year into the past for startDate
|
||||
startDate = ensureDay(now.year() - 1, var.startTime.month, var.startTime.day);
|
||||
startDate = startDate.addYears(-1);
|
||||
}
|
||||
|
||||
if (startDate >= now && now >= endDate)
|
||||
|
Loading…
Reference in New Issue
Block a user