From fef98bc693cd62bde5d5d6440a71524c6641da86 Mon Sep 17 00:00:00 2001 From: skeeter Date: Tue, 16 Jan 2001 03:26:16 +0000 Subject: [PATCH] small fixes for the change of get_sunday_before() --- calendar/inc/class.calendar.inc.php | 4 ++-- calendar/inc/footer.inc.php | 4 +--- calendar/inc/hook_home.inc.php | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/calendar/inc/class.calendar.inc.php b/calendar/inc/class.calendar.inc.php index fbfd7d7342..34fb7f6562 100755 --- a/calendar/inc/class.calendar.inc.php +++ b/calendar/inc/class.calendar.inc.php @@ -38,8 +38,8 @@ $this->printer_friendly = $p_friendly; - $now = time(); - $this->today = $this->splitdate($now); +// $now = time(); + $this->today = $this->localdates(time()); } function set_filter() { diff --git a/calendar/inc/footer.inc.php b/calendar/inc/footer.inc.php index 47dc7c079f..cf48b4e3c1 100644 --- a/calendar/inc/footer.inc.php +++ b/calendar/inc/footer.inc.php @@ -75,9 +75,7 @@ } $d_time = mktime(0,0,0,$m,$d,$y); $thisdate = date("Ymd", $d_time); - $sun = $phpgw->calendar->get_sunday_before($y,$m,$d); - if ($phpgw_info["user"]["preferences"]["calendar"]["weekdaystarts"] == "Monday") - $sun += 86400; + $sun = $phpgw->calendar->get_weekday_start($y,$m,$d); for ($i = -7; $i <= 7; $i++) { $tsun = $sun + (3600 * 24 * 7 * $i); $tsat = $tsun + (3600 * 24 * 6); diff --git a/calendar/inc/hook_home.inc.php b/calendar/inc/hook_home.inc.php index ebad3261f2..a9a547b0ee 100755 --- a/calendar/inc/hook_home.inc.php +++ b/calendar/inc/hook_home.inc.php @@ -10,9 +10,9 @@ if ($phpgw_info["user"]["preferences"]["calendar"]["mainscreen_showevents"]) { include($phpgw_info["server"]["app_inc"].'/functions.inc.php'); - echo "\n".'
'."\n"; - echo $phpgw->calendar->mini_calendar($phpgw->calendar->today["day"],$phpgw->calendar->today["month"],$phpgw->calendar->today["year"],"day.php").''; - $now = $phpgw->calendar->splitdate(mktime (0, 0, 0, $phpgw->calendar->today["month"], $phpgw->calendar->today["day"], $phpgw->calendar->today["year"]) - ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"])); + echo "\n".'
'."\n"; + echo $phpgw->calendar->mini_calendar($phpgw->calendar->today["day"],$phpgw->calendar->today["month"],$phpgw->calendar->today["year"],"day.php").''; + $now = $phpgw->calendar->gmtdate($phpgw->calendar->today["raw"]); echo '' . '
' . lang(date("F",$phpgw->calendar->today["raw"])).' '.$phpgw->calendar->today["day"].', '.$phpgw->calendar->today["year"].'
';