aboutsummaryrefslogtreecommitdiffstats
path: root/apps/contacts/lib/app.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-09 11:38:22 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-09 11:38:22 -0400
commit78cd1153f012f871935130325167759898f030ab (patch)
tree685a5fe56663e6b6087aa4f28c8f09daf1e80546 /apps/contacts/lib/app.php
parentb830b3e24b281204344e9162352c7034f0a67187 (diff)
parentf9cec1426fe639a5683e36b5fbdeb9149feacb19 (diff)
downloadnextcloud-server-78cd1153f012f871935130325167759898f030ab.tar.gz
nextcloud-server-78cd1153f012f871935130325167759898f030ab.zip
Merge branch 'master' into share_api
Conflicts: apps/contacts/lib/vcard.php apps/files_sharing/sharedstorage.php
Diffstat (limited to 'apps/contacts/lib/app.php')
-rw-r--r--apps/contacts/lib/app.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index e8d9abac417..f6ce213c49b 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -243,6 +243,18 @@ class OC_Contacts_App {
self::getVCategories()->loadFromVObject($contact, true);
}
+ /**
+ * @brief Get the last modification time.
+ * @param $vcard OC_VObject
+ * $return DateTime | null
+ */
+ public static function lastModified($vcard) {
+ $rev = $vcard->getAsString('REV');
+ if ($rev) {
+ return DateTime::createFromFormat(DateTime::W3C, $rev);
+ }
+ }
+
public static function setLastModifiedHeader($contact) {
$rev = $contact->getAsString('REV');
if ($rev) {