From c5ea58b3403c794f6e4de4e70f7802a89269bbb2 Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Tue, 31 Jan 2012 11:09:13 +0100 Subject: tentative fix for end of month/week bug --- models/model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'models') diff --git a/models/model.php b/models/model.php index ad0bde1a9..7ef49ff25 100644 --- a/models/model.php +++ b/models/model.php @@ -1378,10 +1378,14 @@ function event_calendar_generate_listing_params($page_type,$container_guid,$orig $end_ts = strtotime($end_date)+$day-1; $subtitle = elgg_echo('event_calendar:day_label').': '.date('j F Y',strtotime($start_date)); } else if ($mode == "week") { - $end_ts = $start_ts + 6*$day; + // KJ - fix for end date bug + //$end_ts = $start_ts + 6*$day; + $end_ts = $start_ts + 7*$day; $subtitle = elgg_echo('event_calendar:week_label').': '.date('j F',$start_ts) . ' - '.date('j F Y',$end_ts); } else { - $end_ts = strtotime($end_date); + // KJ - fix for end date bug + //$end_ts = strtotime($end_date); + $end_ts = strtotime($end_date)+24*60*60-1; $subtitle = date('F Y',$start_ts); } } -- cgit v1.2.3