Make WordPress Core


Ignore:
Timestamp:
11/03/2003 05:49:15 PM (22 years ago)
Author:
saxmatt
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2-include/b2template.functions.php

    r511 r512  
    248248    // We need to get the month from MySQL
    249249    $thisyear = ''.intval(substr($m, 0, 4));
    250     $d = (($w - 1) * 7) + 6; //it seems mysqls weeks disagree with php's
     250    $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's
    251251    $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')");
    252252} elseif (!empty($m)) {
     
    343343    $newrow = false;
    344344
    345     if ($day == date('j', (time() + ($time_difference * 3600)))) echo '<td id="today">';
     345    if ($day == date('j', (time() + ($time_difference * 3600))) && $thismonth == date('m', time()+($time_difference * 3600))) echo '<td id="today">';
    346346    else echo "<td>";
    347347
Note: See TracChangeset for help on using the changeset viewer.