diff --git a/gen_vor.php b/gen_vor.php
index 277c0cb..df1cebb 100644
--- a/gen_vor.php
+++ b/gen_vor.php
@@ -8,6 +8,13 @@ $fil = file($file_txt, FILE_IGNORE_NEW_LINES);
// Insert header
$arr = ['| | | |', '|:------|:------|:------|'];
$ts=(new DateTime('first day of this month'))->getTimeStamp();
+$tues_ts = strtotime('fourth tuesday of this month + 1 day', $ts);
+
+// Are we past the fourst Tuesday in the month?
+if ((new DateTime())->getTimeStamp() >= $tues_ts) {
+ $ts = strtotime('+1 month', $ts);
+}
+
foreach ($fil as $line) {
$fields = array_filter(explode('|', $line));
if (count($fields) == 2) {
@@ -15,7 +22,7 @@ foreach ($fil as $line) {
$tuesday = strftime('%A, %d.%m.%Y ', strtotime('fourth tuesday of this month', $ts));
array_unshift($fields, $tuesday);
}
- $ts=strtotime('+1 month', $ts);
+ $ts = strtotime('+1 month', $ts);
$li = implode('|', $fields);
// Insert leading and trailing spaces if required
if ($li[0] != ' ') {
diff --git a/layouts/partial/site-header.html~ b/layouts/partial/site-header.html~
deleted file mode 100644
index 92f5027..0000000
--- a/layouts/partial/site-header.html~
+++ /dev/null
@@ -1,30 +0,0 @@
-