min_date(). $branches = []; // Flatten out the majors. foreach (get_all_branches() as $major_branches) { foreach ($major_branches as $branch => $version) { if (version_compare($branch, '5.3', 'ge') && get_branch_security_eol_date($branch) > min_date()) { $branches[$branch] = $version; } } } ksort($branches); return $branches; } function min_date(): DateTime { $now = new DateTime('January 1'); return $now->sub(new DateInterval('P3Y')); } function max_date(): DateTime { $now = new DateTime('January 1'); return $now->add(new DateInterval('P5Y')); } function date_horiz_coord(DateTime $date) { $diff = $date->diff(min_date()); if (!$diff->invert) { return $GLOBALS['margin_left']; } return $GLOBALS['margin_left'] + ($diff->days / (365.24 / $GLOBALS['year_width'])); } $branches = branches_to_show(); $i = 0; foreach ($branches as $branch => $version) { $branches[$branch]['top'] = $header_height + ($branch_height * $i++); } if (!isset($non_standalone)) { header('Content-Type: image/svg+xml'); echo ''; } $years = iterator_to_array(new DatePeriod(min_date(), new DateInterval('P1Y'), max_date())); $width = $margin_left + $margin_right + ((count($years) - 1) * $year_width); $height = $header_height + $footer_height + (count($branches) * $branch_height); ?> $version): ?> $version): ?> format('j M Y') ?> format('j M Y') ?>