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 @@ -
-
- - - FraLUG - {{ .Site.Title }} - - {{ with .Site.Params.subtitle }} - {{ . }} - {{ end }} - -
-
- diff --git a/layouts/shortcodes/dat.html~ b/layouts/shortcodes/dat.html~ deleted file mode 100644 index 472b056..0000000 --- a/layouts/shortcodes/dat.html~ +++ /dev/null @@ -1,32 +0,0 @@ -
- - -
diff --git a/layouts/shortcodes/past.html~ b/layouts/shortcodes/past.html~ deleted file mode 100644 index e71090d..0000000 --- a/layouts/shortcodes/past.html~ +++ /dev/null @@ -1,3 +0,0 @@ -
- {{ readFile "vor.md" | markdownify }} -
diff --git a/layouts/shortcodes/tabref.html~ b/layouts/shortcodes/tabref.html~ deleted file mode 100644 index 3695c16..0000000 --- a/layouts/shortcodes/tabref.html~ +++ /dev/null @@ -1 +0,0 @@ -{{ .Get "title" }} diff --git a/layouts/shortcodes/vor.html~ b/layouts/shortcodes/vor.html~ deleted file mode 100644 index d3ffaf6..0000000 --- a/layouts/shortcodes/vor.html~ +++ /dev/null @@ -1,2 +0,0 @@ -
- {{ readFile "vor.md" | markdownify }}