Most recent edit on 2008-06-20 06:00:54 by JensFischer
Additions:
$tmpTime = strtotime("this ". FIRST_DOW); # get a starting date that is a Monday or Sunday
Deletions:
$tmpTime = strtotime("this ". FIRST_DOW); # get a starting date that is a Sunday
Edited on 2008-06-20 05:59:25 by JensFischer
Additions:
And replace the definition of $tmpTime ($tmpTime = strtotime("this Sunday");) with:
Deletions:
#-first DOW configurable
And after the definition of
Edited on 2008-06-20 05:58:17 by JensFischer
Additions:
(php)
%%(php)
Deletions:
Unknown action "php"
%%Unknown action "php"
Oldest known version of this page was edited on 2008-06-20 05:56:40 by JensFischer []
Page view:
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:
{{php}}
#+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:
{{php}}
#+first DOW configurable
if (strtolower(FIRST_DOW) == "monday") {
$firstwday -= 1;
if ($firstwday < 0) {
$firstwday = 6;
}
}
#-first DOW configurable
And after the definition of
Unknown action "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.