Better date limits
This commit is contained in:
parent
e0d069a6ad
commit
7ddd09bc7a
1 changed files with 5 additions and 6 deletions
11
index.php
11
index.php
|
|
@ -112,12 +112,11 @@ Zur groben Einordnung: Eine Fahrt dauert rund 9 Stunden und kostet pro Person mi
|
||||||
<div id=months>
|
<div id=months>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$start = (new DateTimeImmutable())->setTimestamp(mktime(0, 0, 0, $START_DATE[1], $START_DATE[2], $START_DATE[0]));
|
$date = new DateTimeImmutable();
|
||||||
print_month($start);
|
while ($date->diff((new DateTimeImmutable())->setTimestamp(mktime(0, 0, 0, 3, 1, 2023)))->invert == 0) {
|
||||||
$month_end = (new DateTimeImmutable())->setTimestamp(strtotime("first day of next month", $start->getTimestamp()));
|
print_month($date);
|
||||||
print_month($month_end);
|
$date = (new DateTimeImmutable())->setTimestamp(strtotime("first day of next month", $date->getTimestamp()));
|
||||||
$month_end = (new DateTimeImmutable())->setTimestamp(strtotime("first day of next month", $month_end->getTimestamp()));
|
}
|
||||||
print_month($month_end);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue