Calendar


To have the calendar with the first day of week configurable (I prefer monday as the first day of week), add/change the following in actions/calendar.php:

Add to the contants section:
#+first DOW configurable
define("FIRST_DOW", "Monday");                  # set this to "Monday" or "Sunday"
#-first DOW configurable


Right after the definition of $firstwday ($firstwday = strftime('%w',strtotime($datemonthfirst)); add the following lines:
#+first DOW configurable
if (strtolower(FIRST_DOW) == "monday") {
    $firstwday -= 1;
    if ($firstwday < 0) {
        $firstwday = 6;
    }
}
#-first DOW configurable


And replace the definition of $tmpTime ($tmpTime = strtotime("this Sunday");) with:
#+first DOW configurable
//$tmpTime  = strtotime("this Sunday");         # get a starting date that is a Sunday
$tmpTime    = strtotime("this ". FIRST_DOW);    # get a starting date that is a Monday or Sunday
#-first DOW configurable


Thats it.
There is one comment on this page. [Display comment]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki