diff options
author | jwangen <jwangen> | 2002-10-03 04:48:54 +0000 |
---|---|---|
committer | jwangen <jwangen> | 2002-10-03 04:48:54 +0000 |
commit | b89e74abfa385495d22f36aeed4c83e3f962a3d6 (patch) | |
tree | 1c634584cb1c860a19c27ee30d5495642f4c1b68 | |
parent | 55e814ffba2d705112d9c0ca3d2b24539dd8dc26 (diff) | |
download | phpicalendar-b89e74abfa385495d22f36aeed4c83e3f962a3d6.tar.gz phpicalendar-b89e74abfa385495d22f36aeed4c83e3f962a3d6.tar.bz2 phpicalendar-b89e74abfa385495d22f36aeed4c83e3f962a3d6.zip |
Month now uses $week_start_day
-rw-r--r-- | config.inc.php | 4 | ||||
-rw-r--r-- | month.php | 15 |
2 files changed, 12 insertions, 7 deletions
diff --git a/config.inc.php b/config.inc.php index 4833c5e..44e6c37 100644 --- a/config.inc.php +++ b/config.inc.php @@ -4,8 +4,8 @@ $style_sheet = "silver"; // Themes support $calendar_path = "./calendars"; // path to directory with calendars $default_view = "day"; // default view for calendars = "day", "week", "month" $default_cal = "Home"; // exact filename of calendar without .ics -$language = "japanese"; // Language support - "English", "Polish", "German", "French", "Dutch", "Danish", "Italian", "Japanese", "Norwegian" -$week_start_day = "monday"; // Day of the week your week starts on +$language = "English"; // Language support - "English", "Polish", "German", "French", "Dutch", "Danish", "Italian", "Japanese", "Norwegian" +$week_start_day = "Sunday"; // Day of the week your week starts on $use_sessions = "yes"; // For speedy performance on web servers, not good for localhost use. $day_start = "0700"; // Start time for day grid $gridLength = "15"; // grid distance in minutes for day view @@ -20,7 +20,8 @@ $prev_month = date("Ymd", DateAdd ("m", "-1", $date)); $display_month = localizeDate ($dateFormat_month, $date); $parse_month = date ("Ym", $date); - $first_sunday = sundayOfWeek($this_year, $this_month, "1"); + $first_of_month = $this_year.$this_month."01"; + $start_month_day = dateOfWeek($first_of_month, $start_week_day); $thisday2 = localizeDate($dateFormat_week_list, $unix_time); @@ -56,9 +57,13 @@ </tr> <tr> <?php - // Runs through the days of the week, should use array_push or pop to set correct beginning day. ? - foreach ($daysofweek_lang as $daysofweek) { - echo "<td valign=\"top\" width=\"105\" height=\"12\" bgcolor=\"#eeeeee\" class=\"V9\"><center><b>$daysofweek</b></center></td>"; + // loops through 7 times, starts with $week_start_day + $start_day = strtotime($week_start_day); + for ($i=0; $i<7; $i++) { + $day_num = date("w", $start_day); + $day = $daysofweek_lang[$day_num]; + print "<td valign=\"top\" width=\"105\" height=\"12\" bgcolor=\"#eeeeee\" class=\"V9\"><center><b>$day</b></center></td>"; + $start_day = ($start_day + (24.5 * 60 * 60)); } ?> </tr> @@ -79,7 +84,7 @@ <table width="100%" border="0" cellspacing="1" cellpadding="0" class="G10B" bgcolor="#A1A5A9"> <tr> <?php - $sunday = strtotime("$first_sunday"); + $sunday = strtotime("$start_month_day"); $i = 0; $whole_month = TRUE; $num_of_events = 0; |