summaryrefslogtreecommitdiffstats
path: root/pykolab/xml/utils.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-17 20:51:29 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-17 20:51:39 +0100
commitc8abb4150f7e9c1f80a7098a332561ae92e135a3 (patch)
treee73060dd117c528c5c3d99de0e0414cd9f8c1fbc /pykolab/xml/utils.py
parent94cd4fab8e9e80111fc3c07636ab0fae4af4c49d (diff)
downloadpykolab-c8abb4150f7e9c1f80a7098a332561ae92e135a3.tar.gz
Add support for invitations of recurring events and single occurrences (#4552)
Diffstat (limited to 'pykolab/xml/utils.py')
-rw-r--r--pykolab/xml/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pykolab/xml/utils.py b/pykolab/xml/utils.py
index 9ff29b6..c92c52f 100644
--- a/pykolab/xml/utils.py
+++ b/pykolab/xml/utils.py
@@ -122,6 +122,11 @@ def to_cdatetime(_datetime, with_timezone=True, as_utc=False):
return _cdatetime
+def dates_equal(a, b):
+ date_format = '%Y%m%d' if isinstance(a, datetime.date) and isinstance(b, datetime.date) else '%Y%m%dT%H%M%S'
+ return type(a) == type(b) and a.strftime(date_format) == b.strftime(date_format)
+
+
property_labels = {
"name": N_("Name"),
"summary": N_("Summary"),