adsd
All checks were successful
Deploy / deploy-staging (push) Successful in 53s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-09-24 03:12:10 +02:00
parent 8237b2e7b3
commit 1f253c99bc
2 changed files with 4 additions and 2 deletions

View File

@@ -2208,7 +2208,8 @@ final class AnalyticsService
$monthIndex = (((int) $start->format('Y')) * 12) + ((int) $start->format('n')) - 1 + $runtimeMonths;
$year = intdiv($monthIndex, 12);
$month = ($monthIndex % 12) + 1;
$day = min((int) $start->format('j'), cal_days_in_month(CAL_GREGORIAN, $month, $year));
$daysInTargetMonth = (int) $start->setDate($year, $month, 1)->format('t');
$day = min((int) $start->format('j'), $daysInTargetMonth);
return $start->setDate($year, $month, $day)->getTimestamp();
}

View File

@@ -1727,7 +1727,8 @@ final class MiningRepository
$monthIndex = (((int) $start->format('Y')) * 12) + ((int) $start->format('n')) - 1 + $months;
$year = intdiv($monthIndex, 12);
$month = ($monthIndex % 12) + 1;
$day = min((int) $start->format('j'), cal_days_in_month(CAL_GREGORIAN, $month, $year));
$daysInTargetMonth = (int) $start->setDate($year, $month, 1)->format('t');
$day = min((int) $start->format('j'), $daysInTargetMonth);
$end = $start->setDate($year, $month, $day);
$runtimeDays = ($end->getTimestamp() - $start->getTimestamp()) / 86400;
} catch (\Throwable) {