Вы можете использовать этот код, чтобы выяснить, что:
$ts=array(1322784000, 1326989000, 1323216000, strtotime('2011-12-28'), strtotime('2011-12-21'), strtotime('2011-12-28'), strtotime('2011-12-29') );
foreach ($ts as $t) {
$dt = new DateTime('@' . $t);
$d = ceil($dt->format('d')/7);
$str="";
switch ($d) {
case 1: $str = "1st ";
break;
case 2: $str = "2nd ";
break;
case 3: $str = "3rd ";
break;
case 4: $str = "4th ";
break;
default: $str = "5th ";
break;
}
echo $dt->format('Y-m-d H:i:s') . " is: " . $str . $dt->format('l') . "\n";
}
OUTPUT
2011-12-02 00:00:00 is: 1st Friday
2012-01-19 16:03:20 is: 3rd Thursday
2011-12-07 00:00:00 is: 1st Wednesday
2011-12-28 00:00:00 is: 4th Wednesday
2011-12-21 00:00:00 is: 3rd Wednesday
2011-12-28 00:00:00 is: 4th Wednesday
2011-12-29 00:00:00 is: 5th Thursday