Menu ▾ ▴

#667 Restrict "onday" to a single month

open
nobody
Month (47)
5
2012-12-21
2011-01-27
ChrisH
No

Here is a modification I made to the calendar. I was not happy with the current day indication (a colored day of the month) getting indicated for every month. I wanted it to be a unique day on the calendar - only indicated on the current month, not indicated as the same day every single month.

I came up with a solution that I am posting here. This compares this day of each month to this day of THIS month and THIS year...

File to modify:
\calendar\functions\template.php

line 989 - change to:
$daylink2 = date ('Y M d', $start_day);

line 994 - change to:
} elseif ($daylink2 == date('Y M d', time() + $phpiCal_config->second_offset)) {

That is all
Chris

Discussion

  • ChrisH

    ChrisH - 2011-01-27

    P.S. For the first line, that is an inserted line. So the next line I mention has been bumped down one from the original.

    So line 988, which says:
    $daylink = date ('Ymd', $start_day);
    stays there.

    Thus line 993, which says
    } elseif ($daylink == $getdate) {
    becomes line 994. In addition, it gets changed to
    } elseif ($daylink2 == date('Y M d', time() + $phpiCal_config->second_offset)) {

    I hope that is more clear.

    Thanks
    Chris

     

Log in to post a comment.