diff options
author | zotlabs <mike@macgirvin.com> | 2019-04-28 17:47:26 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-04-28 17:47:26 -0700 |
commit | 95871fe13c3a9515d82510997a734bf7e8945bad (patch) | |
tree | e6974fb15bac5844220287c94755f203dc403829 /vendor/sabre/vobject/lib/Component/VJournal.php | |
parent | 9536a490b3fc5fc02a6d0a79275e8df03ee8156b (diff) | |
parent | 0cecfceb14083141da389b7cc1e413ba5d5ca6d7 (diff) | |
download | volse-hubzilla-95871fe13c3a9515d82510997a734bf7e8945bad.tar.gz volse-hubzilla-95871fe13c3a9515d82510997a734bf7e8945bad.tar.bz2 volse-hubzilla-95871fe13c3a9515d82510997a734bf7e8945bad.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'vendor/sabre/vobject/lib/Component/VJournal.php')
-rw-r--r-- | vendor/sabre/vobject/lib/Component/VJournal.php | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/vendor/sabre/vobject/lib/Component/VJournal.php b/vendor/sabre/vobject/lib/Component/VJournal.php index a1b1a863d..9bd336776 100644 --- a/vendor/sabre/vobject/lib/Component/VJournal.php +++ b/vendor/sabre/vobject/lib/Component/VJournal.php @@ -14,8 +14,8 @@ use Sabre\VObject; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class VJournal extends VObject\Component { - +class VJournal extends VObject\Component +{ /** * Returns true or false depending on if the event falls in the specified * time-range. This is used for filtering purposes. @@ -28,8 +28,8 @@ class VJournal extends VObject\Component { * * @return bool */ - function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) { - + public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) + { $dtstart = isset($this->DTSTART) ? $this->DTSTART->getDateTime() : null; if ($dtstart) { $effectiveEnd = $dtstart; @@ -37,11 +37,10 @@ class VJournal extends VObject\Component { $effectiveEnd = $effectiveEnd->modify('+1 day'); } - return ($start <= $effectiveEnd && $end > $dtstart); - + return $start <= $effectiveEnd && $end > $dtstart; } - return false; + return false; } /** @@ -59,36 +58,35 @@ class VJournal extends VObject\Component { * * @var array */ - function getValidationRules() { - + public function getValidationRules() + { return [ - 'UID' => 1, + 'UID' => 1, 'DTSTAMP' => 1, - 'CLASS' => '?', - 'CREATED' => '?', - 'DTSTART' => '?', + 'CLASS' => '?', + 'CREATED' => '?', + 'DTSTART' => '?', 'LAST-MODIFIED' => '?', - 'ORGANIZER' => '?', + 'ORGANIZER' => '?', 'RECURRENCE-ID' => '?', - 'SEQUENCE' => '?', - 'STATUS' => '?', - 'SUMMARY' => '?', - 'URL' => '?', + 'SEQUENCE' => '?', + 'STATUS' => '?', + 'SUMMARY' => '?', + 'URL' => '?', 'RRULE' => '?', - 'ATTACH' => '*', - 'ATTENDEE' => '*', - 'CATEGORIES' => '*', - 'COMMENT' => '*', - 'CONTACT' => '*', + 'ATTACH' => '*', + 'ATTENDEE' => '*', + 'CATEGORIES' => '*', + 'COMMENT' => '*', + 'CONTACT' => '*', 'DESCRIPTION' => '*', - 'EXDATE' => '*', - 'RELATED-TO' => '*', - 'RDATE' => '*', + 'EXDATE' => '*', + 'RELATED-TO' => '*', + 'RDATE' => '*', ]; - } /** @@ -96,12 +94,11 @@ class VJournal extends VObject\Component { * * @return array */ - protected function getDefaults() { - + protected function getDefaults() + { return [ - 'UID' => 'sabre-vobject-' . VObject\UUIDUtil::getUUID(), - 'DTSTAMP' => date('Ymd\\THis\\Z'), + 'UID' => 'sabre-vobject-'.VObject\UUIDUtil::getUUID(), + 'DTSTAMP' => gmdate('Ymd\\THis\\Z'), ]; - } } |