From 9d4a9f2152bca029ba1471b4ff3e09a15a020785 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 26 Oct 2004 21:25:54 +0000 Subject: Week start day works properly. --- config.inc.php | 2 +- functions/template.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.inc.php b/config.inc.php index 9d08520..a2a3dd6 100644 --- a/config.inc.php +++ b/config.inc.php @@ -10,7 +10,7 @@ $default_view = 'day'; // Default view for calendars = 'day', 'week', 'mont $minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current' $default_cal = $ALL_CALENDARS_COMBINED; // Exact filename of calendar without .ics. Or set to $ALL_CALENDARS_COMBINED to open all calenders combined into one. $language = 'English'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese', 'Esperanto', 'Korean' -$week_start_day = 'Sunday'; // Day of the week your week starts on +$week_start_day = 'Monday'; // Day of the week your week starts on $day_start = '0700'; // Start time for day grid $day_end = '2300'; // End time for day grid $gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred diff --git a/functions/template.php b/functions/template.php index c3aac5a..4b11918 100644 --- a/functions/template.php +++ b/functions/template.php @@ -395,7 +395,7 @@ class Page { preg_match("!<\!-- loop daysofweek on -->(.*)<\!-- loop daysofweek off -->!is", $this->page, $match1); $loop_dof = trim($match1[1]); $start_wt = strtotime(dateOfWeek($getdate, $week_start_day)); - $start_day = strtotime($week_start_day); + $start_day = strtotime(dateOfWeek($getdate, $week_start_day)); for ($i=0; $i<7; $i++) { $day_num = date("w", $start_day); $daylink = date('Ymd', $start_wt); @@ -724,7 +724,8 @@ class Page { $fake_getdate_time = strtotime($this_year.'-'.$offset.'-15'); } - $start_day = strtotime($week_start_day); + //$start_day = strtotime($week_start_day); + $start_day = strtotime(dateOfWeek($getdate, $week_start_day)); $month_title = localizeDate ($dateFormat_month, $fake_getdate_time); $month_date = date ('Ymd', $fake_getdate_time); -- cgit v1.2.3