aboutsummaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-01-31 11:09:13 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2012-01-31 11:09:13 +0100
commitc5ea58b3403c794f6e4de4e70f7802a89269bbb2 (patch)
treed2dd5448521f0a11eaa99b29266e0773df65fde2 /models
parent3e1e4d60de443a067aeb18f2873f5e35b4a5f4e2 (diff)
downloadelgg-c5ea58b3403c794f6e4de4e70f7802a89269bbb2.tar.gz
elgg-c5ea58b3403c794f6e4de4e70f7802a89269bbb2.tar.bz2
tentative fix for end of month/week bug
Diffstat (limited to 'models')
-rw-r--r--models/model.php8
1 files changed, 6 insertions, 2 deletions
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);
}
}