Revision [20039]

This is an old revision of JensFischer made by JensFischer on 2008-06-20 05:58:17.

 

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 after the definition of
(php)
#+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 Sunday
#-first DOW configurable%%

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