'Januar', 2 => 'Februar', 3 => 'März', 4 => 'April', 5 => 'Mai', 6 => 'Juni', 7 => 'Juli', 8 => 'August', 9 => 'September', 10 => 'Oktober', 11 => 'November', 12 => 'Dezember', ]; // ------------------------------------------------------------------------- // Python: Jahresübersicht — nur wenn Tab=Jahr und Berechnen geklickt // ------------------------------------------------------------------------- $allPhaseEvents = []; $lunarEclipses = []; // [{kind, month, day, local_time}, ...] if ($doCalc && $activeTab === 'year') { for ($m = 1; $m <= 12; $m++) { $output = []; $exitCode = 0; $cmd = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', [ $pythonScriptPath, 'moon_phases_for_month', (string) $selectedYear, (string) $m, $chartTimezone, ])) . ' 2>&1'; exec($cmd, $output, $exitCode); $decoded = json_decode(trim(implode("\n", $output)), true); if (is_array($decoded) && ($decoded['ok'] ?? false) && is_array($decoded['phases'] ?? null)) { foreach ($decoded['phases'] as $phase) { $parts = explode('.', (string) ($phase['local_date'] ?? '')); if (count($parts) === 3) { $day = (int) $parts[0]; $month = (int) $parts[1]; if ($month === $m && $day >= 1 && $day <= 31) { $allPhaseEvents[] = [ 'month' => $month, 'day' => $day, 'label' => (string) ($phase['label'] ?? ''), 'time' => (string) ($phase['local_time'] ?? ''), ]; } } } } } // Mondfinsternisse für das Jahr $ecOutput = []; $ecExitCode = 0; $ecCmd = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', [ $pythonScriptPath, 'lunar_eclipses_for_year', (string) $selectedYear, $chartTimezone, ])) . ' 2>&1'; exec($ecCmd, $ecOutput, $ecExitCode); $ecDecoded = json_decode(trim(implode("\n", $ecOutput)), true); if (is_array($ecDecoded) && ($ecDecoded['ok'] ?? false) && is_array($ecDecoded['eclipses'] ?? null)) { $lunarEclipses = $ecDecoded['eclipses']; } } // ------------------------------------------------------------------------- // Python: Monatskalender — nur wenn Tab=Monat und Berechnen geklickt // ------------------------------------------------------------------------- $calPhaseEvents = []; if ($doCalc && $activeTab === 'month') { $output = []; $exitCode = 0; $cmd = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', [ $pythonScriptPath, 'moon_phases_for_month', (string) $selectedYear, (string) $selectedMonth, $chartTimezone, ])) . ' 2>&1'; exec($cmd, $output, $exitCode); $decoded = json_decode(trim(implode("\n", $output)), true); if (is_array($decoded) && ($decoded['ok'] ?? false) && is_array($decoded['phases'] ?? null)) { foreach ($decoded['phases'] as $phase) { $parts = explode('.', (string) ($phase['local_date'] ?? '')); if (count($parts) === 3) { $day = (int) $parts[0]; if ($day >= 1 && $day <= 31) { $calPhaseEvents[$day] = [ 'label' => (string) ($phase['label'] ?? ''), 'time' => (string) ($phase['local_time'] ?? ''), ]; } } } } // Mondfinsternisse für das Jahr (für den Monats-Tab benötigt) $ecOutput = []; $ecExitCode = 0; $ecCmd = $pythonExecutable . ' ' . implode(' ', array_map('escapeshellarg', [ $pythonScriptPath, 'lunar_eclipses_for_year', (string) $selectedYear, $chartTimezone, ])) . ' 2>&1'; exec($ecCmd, $ecOutput, $ecExitCode); $ecDecoded = json_decode(trim(implode("\n", $ecOutput)), true); if (is_array($ecDecoded) && ($ecDecoded['ok'] ?? false) && is_array($ecDecoded['eclipses'] ?? null)) { $lunarEclipses = $ecDecoded['eclipses']; } } ?>

Mondphasen

Mondphasen <?= htmlspecialchars((string) $selectedYear, ENT_QUOTES, 'UTF-8') ?>

Zeichne Jahresübersicht…

Jahr wählen und auf  Berechnen  klicken.
Mondkalender <?= htmlspecialchars($monthNamesDE[$selectedMonth] . ' ' . $selectedYear, ENT_QUOTES, 'UTF-8') ?>

Zeichne Monatskalender…

Monat wählen und auf  Berechnen  klicken.