aboutsummaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2008-12-29 03:07:34 +0000
committerJim Hu <jimhu@users.sourceforge.net>2008-12-29 03:07:34 +0000
commit50ce9c8c7c7ac6b8c3137e84ec4da8a1bbe38a12 (patch)
treedb0b8b6315decf58289016c5472ed52fc7a9784f /includes
parentcb7df8518466fe3a1e70df815dca056730cbbbc5 (diff)
downloadphpicalendar-50ce9c8c7c7ac6b8c3137e84ec4da8a1bbe38a12.tar.gz
phpicalendar-50ce9c8c7c7ac6b8c3137e84ec4da8a1bbe38a12.tar.bz2
phpicalendar-50ce9c8c7c7ac6b8c3137e84ec4da8a1bbe38a12.zip
change handling of multiday allday events in week view; other misc changes
Diffstat (limited to 'includes')
-rw-r--r--includes/event.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/includes/event.php b/includes/event.php
index 8d57ae9..c15f3d2 100644
--- a/includes/event.php
+++ b/includes/event.php
@@ -2,6 +2,7 @@
$current_view = "event";
define('BASE', '../');
include_once(BASE.'functions/init.inc.php');
+require_once(BASE.'functions/date_functions.php');
require_once(BASE.'functions/template.php');
# information for the popup is sent via $_POST by a javascript snippet in
@@ -14,9 +15,15 @@ $attendee = unserialize($event['attendee']);
// Format event time
// All day
if ($_POST['time'] == -1) {
- $event_times = $lang['l_all_day'];
+ $start = localizeDate($dateFormat_week, $event['start_unixtime']);
+ $end = localizeDate($dateFormat_week, ($event['end_unixtime'] - 60));
+ $event_times = $lang['l_all_day']." $start";
+ if ($start != $end) $event_times = "$start - $end";
} else {
- $event_times = date($timeFormat, $event['start_unixtime']) . ' - ' . date($timeFormat, $event['end_unixtime']);
+ $start = date($timeFormat, $event['start_unixtime']);
+ $end = date($timeFormat, $event['end_unixtime']);
+ $event_times = "$start";
+ if ($start != $end) $event_times = "$start - $end";
}
$event['event_text'] = urldecode($event['event_text']);

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