diff --git a/index.php b/index.php index fa149a6..a9e4f84 100644 --- a/index.php +++ b/index.php @@ -353,22 +353,6 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel $rangeEnd = new DateTimeImmutable('today'); } $dateRangeText = 'vom ' . $periodStart->format('d.m') . ' bis ' . $rangeEnd->format('d.m'); - if ($isTest && !empty($articles)) { - $timestamps = []; - foreach ($articles as $article) { - $date = DateTimeImmutable::createFromFormat('Y-m-d', (string)($article['date'] ?? '')); - if ($date instanceof DateTimeImmutable) { - $timestamps[] = $date->getTimestamp(); - } - } - - if (!empty($timestamps)) { - sort($timestamps); - $from = (new DateTimeImmutable('@' . (string)$timestamps[0]))->setTimezone(new DateTimeZone(date_default_timezone_get())); - $to = (new DateTimeImmutable('@' . (string)$timestamps[count($timestamps) - 1]))->setTimezone(new DateTimeZone(date_default_timezone_get())); - $dateRangeText = 'vom ' . $from->format('d.m') . ' bis ' . $to->format('d.m'); - } - } $articleRows = ''; if ($count === 0) { diff --git a/wiki.php b/wiki.php index 8fd0838..2b6b2a9 100644 --- a/wiki.php +++ b/wiki.php @@ -353,22 +353,6 @@ function buildNewsletterHtml(array $config, array $articles, string $periodLabel $rangeEnd = new DateTimeImmutable('today'); } $dateRangeText = 'vom ' . $periodStart->format('d.m') . ' bis ' . $rangeEnd->format('d.m'); - if ($isTest && !empty($articles)) { - $timestamps = []; - foreach ($articles as $article) { - $date = DateTimeImmutable::createFromFormat('Y-m-d', (string)($article['date'] ?? '')); - if ($date instanceof DateTimeImmutable) { - $timestamps[] = $date->getTimestamp(); - } - } - - if (!empty($timestamps)) { - sort($timestamps); - $from = (new DateTimeImmutable('@' . (string)$timestamps[0]))->setTimezone(new DateTimeZone(date_default_timezone_get())); - $to = (new DateTimeImmutable('@' . (string)$timestamps[count($timestamps) - 1]))->setTimezone(new DateTimeZone(date_default_timezone_get())); - $dateRangeText = 'vom ' . $from->format('d.m') . ' bis ' . $to->format('d.m'); - } - } $articleRows = ''; if ($count === 0) {