summaryrefslogtreecommitdiffstats
path: root/3rdparty/Sabre/VObject/Component/VTodo.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-08-09 17:31:10 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-08-09 17:34:18 +0200
commit4e85848c927896b4d9084fd9019478baaee4507b (patch)
treece9a1f490f33a05672a389e335016c35c3f81ca3 /3rdparty/Sabre/VObject/Component/VTodo.php
parentf9cec1426fe639a5683e36b5fbdeb9149feacb19 (diff)
downloadnextcloud-server-4e85848c927896b4d9084fd9019478baaee4507b.tar.gz
nextcloud-server-4e85848c927896b4d9084fd9019478baaee4507b.zip
remove SabreDav 1.6.3
Diffstat (limited to '3rdparty/Sabre/VObject/Component/VTodo.php')
-rwxr-xr-x3rdparty/Sabre/VObject/Component/VTodo.php68
1 files changed, 0 insertions, 68 deletions
diff --git a/3rdparty/Sabre/VObject/Component/VTodo.php b/3rdparty/Sabre/VObject/Component/VTodo.php
deleted file mode 100755
index 79d06298d7f..00000000000
--- a/3rdparty/Sabre/VObject/Component/VTodo.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/**
- * VTodo component
- *
- * This component contains some additional functionality specific for VTODOs.
- *
- * @package Sabre
- * @subpackage VObject
- * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
- * @author Evert Pot (http://www.rooftopsolutions.nl/)
- * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
- */
-class Sabre_VObject_Component_VTodo extends Sabre_VObject_Component {
-
- /**
- * Returns true or false depending on if the event falls in the specified
- * time-range. This is used for filtering purposes.
- *
- * The rules used to determine if an event falls within the specified
- * time-range is based on the CalDAV specification.
- *
- * @param DateTime $start
- * @param DateTime $end
- * @return bool
- */
- public function isInTimeRange(DateTime $start, DateTime $end) {
-
- $dtstart = isset($this->DTSTART)?$this->DTSTART->getDateTime():null;
- $duration = isset($this->DURATION)?Sabre_VObject_DateTimeParser::parseDuration($this->DURATION):null;
- $due = isset($this->DUE)?$this->DUE->getDateTime():null;
- $completed = isset($this->COMPLETED)?$this->COMPLETED->getDateTime():null;
- $created = isset($this->CREATED)?$this->CREATED->getDateTime():null;
-
- if ($dtstart) {
- if ($duration) {
- $effectiveEnd = clone $dtstart;
- $effectiveEnd->add($duration);
- return $start <= $effectiveEnd && $end > $dtstart;
- } elseif ($due) {
- return
- ($start < $due || $start <= $dtstart) &&
- ($end > $dtstart || $end >= $due);
- } else {
- return $start <= $dtstart && $end > $dtstart;
- }
- }
- if ($due) {
- return ($start < $due && $end >= $due);
- }
- if ($completed && $created) {
- return
- ($start <= $created || $start <= $completed) &&
- ($end >= $created || $end >= $completed);
- }
- if ($completed) {
- return ($start <= $completed && $end >= $completed);
- }
- if ($created) {
- return ($end > $created);
- }
- return true;
-
- }
-
-}
-
-?>