Skip to content

Commit

Permalink
Merge pull request #2 from inod/patch-1
Browse files Browse the repository at this point in the history
Added year check for today date
  • Loading branch information
donatj committed Sep 20, 2013
2 parents bcdd0b6 + 7af40c1 commit dea687b
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;
}

}
}

1 comment on commit dea687b

@jasondavis
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funny thing, I had just added this exact code in yesterday as well! (same method even)

Please sign in to comment.