aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-17 10:20:22 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-17 10:20:22 +0300
commitec32618e1158beba1cf5b4c91c3835a233eceeeb (patch)
tree1072dbf6e876a42038a2de45a4314ee62d841d56
parentde30a72c4e1f051eef2a0bd389fc51e6a64d54c3 (diff)
downloadPrismLauncher-ec32618e1158beba1cf5b4c91c3835a233eceeeb.tar.gz
PrismLauncher-ec32618e1158beba1cf5b4c91c3835a233eceeeb.tar.bz2
PrismLauncher-ec32618e1158beba1cf5b4c91c3835a233eceeeb.zip
reveted back to add years
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
-rw-r--r--launcher/ui/themes/CatPack.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/launcher/ui/themes/CatPack.cpp b/launcher/ui/themes/CatPack.cpp
index ebb100a4..f0d8ddd5 100644
--- a/launcher/ui/themes/CatPack.cpp
+++ b/launcher/ui/themes/CatPack.cpp
@@ -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)