From fb5db9e157ac42219d2d3ff67883063c9f7084a1 Mon Sep 17 00:00:00 2001 From: Vivien Barousse Date: Mon, 11 Jul 2011 11:11:15 +0100 Subject: [PATCH] Added support for creationdate and getlastmodified props --- lib/net/dav/item.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/net/dav/item.rb b/lib/net/dav/item.rb index 2bc0ff0..6053078 100644 --- a/lib/net/dav/item.rb +++ b/lib/net/dav/item.rb @@ -26,6 +26,14 @@ def contentlength @response./(".//x:getcontenttype", @namespaces).inner_text rescue nil end + def creationdate + Time.parse(@response./(".//x:creationdate", @namespaces).inner_text) + end + + def lastmodificationdate + Time.parse(@response./(".//x:getlastmodified", @namespaces).inner_text) + end + end # URI of item