reveted back to add years

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-07-17 10:20:22 +03:00
parent de30a72c4e
commit ec32618e11
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -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)