Skip to content

Commit

Permalink
Added year check for today date
Browse files Browse the repository at this point in the history
  • Loading branch information
inod committed Sep 20, 2013
1 parent bcdd0b6 commit 7af40c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/donatj/SimpleCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function show( $echo = true ) {

$count = $wday + 1;
for( $i = 1; $i <= $no_days; $i++ ) {
$out .= '<td'. ($i == $this->now['mday'] && $this->now['mon'] == date('n') ? ' class="today"' : '').'>';
$out .= '<td'. ($i == $this->now['mday'] && $this->now['mon'] == date('n') && $this->now['year'] == date('Y') ? ' class="today"' : '').'>';

$datetime = mktime ( 0, 0, 1, $this->now['mon'], $i, $this->now['year'] );

Expand Down Expand Up @@ -175,4 +175,4 @@ public function show( $echo = true ) {
return $out;
}

}
}

0 comments on commit 7af40c1

Please sign in to comment.