Don't highlight day if we're in a different month. :)

git-svn-id: https://develop.svn.wordpress.org/trunk@512 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2003-11-03 17:49:15 +00:00
parent 6f4c146d1c
commit b6ce582bce
1 changed files with 2 additions and 2 deletions

View File

@ -247,7 +247,7 @@ if (!empty($monthnum) && !empty($year)) {
} elseif (!empty($w)) {
// We need to get the month from MySQL
$thisyear = ''.intval(substr($m, 0, 4));
$d = (($w - 1) * 7) + 6; //it seems mysqls weeks disagree with php's
$d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's
$thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')");
} elseif (!empty($m)) {
$calendar = substr($m, 0, 6);
@ -342,7 +342,7 @@ for ($day = 1; $day <= $daysinmonth; ++$day) {
if ($newrow) echo "\n </tr>\n <tr>\n\t";
$newrow = false;
if ($day == date('j', (time() + ($time_difference * 3600)))) echo '<td id="today">';
if ($day == date('j', (time() + ($time_difference * 3600))) && $thismonth == date('m', time()+($time_difference * 3600))) echo '<td id="today">';
else echo "<td>";
if (in_array($day, $daywithpost)) {