From b89e74abfa385495d22f36aeed4c83e3f962a3d6 Mon Sep 17 00:00:00 2001 From: jwangen Date: Thu, 3 Oct 2002 04:48:54 +0000 Subject: Month now uses $week_start_day --- month.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'month.php') 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 @@
$daysofweek
"; + // 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 "
$day
"; + $start_day = ($start_day + (24.5 * 60 * 60)); } ?> @@ -79,7 +84,7 @@