From c94b96a440b997db3462350235a681a538c0cd83 Mon Sep 17 00:00:00 2001 From: gitea Date: Tue, 28 Mar 2023 23:58:54 +0200 Subject: [PATCH] Fixed gen_vor.php --- gen_vor.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gen_vor.php b/gen_vor.php index 4e5a7e0..8df99fd 100644 --- a/gen_vor.php +++ b/gen_vor.php @@ -21,11 +21,14 @@ $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', $ts); +$tues_ts = strtotime('fourth wednesday of this month', $ts); +$tues_date = (new DateTime())->setTimeStamp($tues_ts); // Are we past the fourth Tuesday of this month? -if ((new DateTime())->getTimeStamp() >= $tues_ts) { +if ((new DateTime())->getTimeStamp() >= $tues_ts && $tues_date->format('md') != '0322') { $ts = strtotime('+1 month', $ts); + var_dump($tues_date->format('md')); + var_dump($ts); } foreach ($fil as $line) {