Adapt to production

This commit is contained in:
Adrian Heine 2022-11-22 00:16:45 +01:00
parent 791a522579
commit 213d80e15b

View file

@ -1,4 +1,5 @@
<?php <?php
locale_set_default('de_DE');
$config = require_once './config.php'; $config = require_once './config.php';
$START_DATE = $config['start_date']; $START_DATE = $config['start_date'];
$EVENTS = $config['events']; $EVENTS = $config['events'];
@ -45,7 +46,7 @@ function print_month($start) {
<caption><h3><?= $month_name ?></caption> <caption><h3><?= $month_name ?></caption>
<tr><?php foreach ($DAYS_OF_WEEK as $day) { echo "<th>$day</th>"; }?></tr> <tr><?php foreach ($DAYS_OF_WEEK as $day) { echo "<th>$day</th>"; }?></tr>
<?php <?php
$date = DateTime::createFromInterface($week_start); $date = DateTime::createFromImmutable($week_start);
while ($date->diff($month_end)->invert == 0) { while ($date->diff($month_end)->invert == 0) {
echo "<tr>"; echo "<tr>";
for ($n = 0; $n < 7; ++$n) { for ($n = 0; $n < 7; ++$n) {