33 $dtstart = isset($this->DTSTART) ? $this->DTSTART->getDateTime() : null;
35 $due = isset($this->DUE) ? $this->DUE->getDateTime() : null;
37 $created = isset($this->CREATED) ? $this->CREATED->getDateTime() : null;
41 $effectiveEnd = $dtstart->add($duration);
42 return $start <= $effectiveEnd && $end > $dtstart;
45 ($start < $due || $start <= $dtstart) &&
46 ($end > $dtstart || $end >= $due);
48 return $start <= $dtstart && $end > $dtstart;
52 return ($start < $due && $end >= $due);
54 if ($completed && $created) {
56 ($start <= $created || $start <= $completed) &&
57 ($end >= $created || $end >= $completed);
60 return ($start <= $completed && $end >= $completed);
63 return ($end > $created);
96 'LAST-MODIFIED' =>
'?',
101 'RECURRENCE-ID' =>
'?',
117 'REQUEST-STATUS' =>
'*',
150 if (isset($this->DUE) && isset($this->DTSTART)) {
153 $dtStart = $this->DTSTART;
155 if ($due->getValueType() !== $dtStart->getValueType()) {
159 'message' =>
'The value type (DATE or DATE-TIME) must be identical for DUE and DTSTART',
163 } elseif ($due->getDateTime() < $dtStart->getDateTime()) {
167 'message' =>
'DUE must occur after DTSTART',
188 'DTSTAMP' => date(
'Ymd\\THis\\Z'),
isInTimeRange(DateTimeInterface $start, DateTimeInterface $end)
Returns true or false depending on if the event falls in the specified time-range.
validate($options=0)
Validates the node for correctness.
getDefaults()
This method should return a list of default property values.
static parseDuration($duration, $asString=false)
Parses an iCalendar (RFC5545) formatted duration value.
static getUUID()
Returns a pseudo-random v4 UUID.