There's going to be 'tighter' and more efficient ways to do this.. probably
some using strtotime(). I have an irrational distrust of the results from
strtotime() though, so I use it sparingly.
Here's a simple solution though:
?php
// Designate month
$month = 2;
// Designate year
$year
$currentTS = strtotime(now);
$currentYear = date(Y);
$nextYear = $currentYear + 1;
$lastSundayInSepCurrentYearTS = strtotime(last Sunday,
strtotime(10/1/$currentYear));
$firstDayNextYearTS = strtotime(1/1/$nextYear);
//
// So your psuedocode becomes...
//
if (($currentTS
2 matches
Mail list logo