|
|
|
@ -21,7 +21,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 wednesday of this month', $ts); |
|
|
|
|
$first_wedn = new DateTime('first wednesday of this month'); |
|
|
|
|
$wednesday = 'fourth'; |
|
|
|
|
// Treat March differently |
|
|
|
|
if ($first_wedn->format('md') == '0301') { |
|
|
|
|
$wednesday = 'fifth'; |
|
|
|
|
} |
|
|
|
|
$tues_ts = strtotime($wednesday . ' wednesday of this month', $ts); |
|
|
|
|
$tues_date = (new DateTime())->setTimeStamp($tues_ts); |
|
|
|
|
|
|
|
|
|
// Are we past the fourth Tuesday of this month? |
|
|
|
|