Fix all-day calculation.
authorJan Schneider <jan@horde.org>
Mon, 6 Apr 2009 21:02:27 +0000 (23:02 +0200)
committerJan Schneider <jan@horde.org>
Mon, 6 Apr 2009 22:15:07 +0000 (00:15 +0200)
kronolith/lib/Event.php

index cce5ae3..1c29bf1 100644 (file)
@@ -1509,11 +1509,11 @@ abstract class Kronolith_Event
     {
         return $this->allday ||
             ($this->start->hour == 0 && $this->start->min == 0 && $this->start->sec == 0 &&
-             (($this->end->hour == 0 && $this->end->min == 0 && $this->end->sec == 0) ||
-              ($this->end->hour == 23 && $this->end->min == 59)) &&
-             ($this->end->mday > $this->start->mday ||
-              $this->end->month > $this->start->month ||
-              $this->end->year > $this->start->year));
+             (($this->end->hour == 23 && $this->end->min == 59) ||
+              ($this->end->hour == 0 && $this->end->min == 0 && $this->end->sec == 0 &&
+               ($this->end->mday > $this->start->mday ||
+                $this->end->month > $this->start->month ||
+                $this->end->year > $this->start->year))));
     }
 
     public function getAlarm()