Save to database #13

Merged
haylan merged 42 commits from save-to-database into main 2026-07-12 21:51:57 +00:00
Showing only changes of commit 14ea788522 - Show all commits
+2 -2
View File
@@ -142,7 +142,7 @@ final class SvgRenderer
if ($cell === null) { if ($cell === null) {
continue; continue;
} }
$ts = strtotime($cell['date']); $ts = (int) strtotime($cell['date']);
$month = (int) date('n', $ts); $month = (int) date('n', $ts);
$dom = (int) date('j', $ts); $dom = (int) date('j', $ts);
@@ -197,7 +197,7 @@ final class SvgRenderer
$y = self::MARGIN_Y + $d * self::STEP; $y = self::MARGIN_Y + $d * self::STEP;
$color = $colors['levels'][$this->level($cell['count'])]; $color = $colors['levels'][$this->level($cell['count'])];
$ts = strtotime($cell['date']); $ts = (int) strtotime($cell['date']);
$suffix = $cell['count'] !== 1 ? 's' : ''; $suffix = $cell['count'] !== 1 ? 's' : '';
$label = $cell['count'] > 0 $label = $cell['count'] > 0
? $cell['count'] . ' contribution' . $suffix . ' on ' . date('F j, Y', $ts) ? $cell['count'] . ' contribution' . $suffix . ' on ' . date('F j, Y', $ts)