|
|
|
@ -33,16 +33,23 @@ $tues_date = (new DateTime())->setTimeStamp($tues_ts); |
|
|
|
|
|
|
|
|
|
const JUST_DATE = 'Ymd'; |
|
|
|
|
|
|
|
|
|
# Check for February / March |
|
|
|
|
$month = $first_day->format('n'); |
|
|
|
|
$cond = true; |
|
|
|
|
if ($month == 2 || $month == 3) { |
|
|
|
|
$cond = $first_day->format(JUST_DATE) != $first_wedn->format(JUST_DATE) && $tues_date->format('md') != '0322'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Are we past the fourth Tuesday of this month? |
|
|
|
|
if ((new DateTime())->getTimeStamp() >= $tues_ts && $first_day->format(JUST_DATE) != $first_wedn->format(JUST_DATE) && $tues_date->format('md') != '0322') { |
|
|
|
|
if ((new DateTime())->getTimeStamp() >= $tues_ts && $cond) { |
|
|
|
|
$ts = strtotime('+1 month', $ts); |
|
|
|
|
/* |
|
|
|
|
var_dump($tues_date->format('md')); |
|
|
|
|
var_dump($tues_date->format('md')); |
|
|
|
|
var_dump($first_day); |
|
|
|
|
var_dump($first_wedn); |
|
|
|
|
var_dump($ts); |
|
|
|
|
*/ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
foreach ($fil as $line) { |
|
|
|
|
// Skip empty lines |
|
|
|
|