aboutsummaryrefslogtreecommitdiffstats
path: root/month.php
diff options
context:
space:
mode:
authorjwangen <jwangen>2002-10-03 04:48:54 +0000
committerjwangen <jwangen>2002-10-03 04:48:54 +0000
commitb89e74abfa385495d22f36aeed4c83e3f962a3d6 (patch)
tree1c634584cb1c860a19c27ee30d5495642f4c1b68 /month.php
parent55e814ffba2d705112d9c0ca3d2b24539dd8dc26 (diff)
downloadphpicalendar-b89e74abfa385495d22f36aeed4c83e3f962a3d6.tar.gz
phpicalendar-b89e74abfa385495d22f36aeed4c83e3f962a3d6.tar.bz2
phpicalendar-b89e74abfa385495d22f36aeed4c83e3f962a3d6.zip
Month now uses $week_start_day
Diffstat (limited to 'month.php')
-rw-r--r--month.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/month.php b/month.php
index 89de5a3..cc33e26 100644
--- a/month.php
+++ b/month.php
@@ -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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy