Fixed gen_vor.php

master
gitea 2 years ago
parent 86c8d003e7
commit c94b96a440
  1. 7
      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) {

Loading…
Cancel
Save