From: Tomas Babej Date: Fri, 20 Feb 2015 17:15:08 +0000 (+0100) Subject: SerializingObject: Add serializers, normalizers and deserializers for start and end... X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/1f6c62230e5c793208600818fad26b4f19710e56?ds=sidebyside;hp=-c SerializingObject: Add serializers, normalizers and deserializers for start and end attributes --- 1f6c62230e5c793208600818fad26b4f19710e56 diff --git a/tasklib/task.py b/tasklib/task.py index 5c05bae..56cda19 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -149,6 +149,24 @@ class SerializingObject(object): def normalize_modified(self, value): return self.datetime_normalizer(value) + def serialize_start(self, value): + return self.timestamp_serializer(value) + + def deserialize_start(self, value): + return self.timestamp_deserializer(value) + + def normalize_start(self, value): + return self.datetime_normalizer(value) + + def serialize_end(self, value): + return self.timestamp_serializer(value) + + def deserialize_end(self, value): + return self.timestamp_deserializer(value) + + def normalize_end(self, value): + return self.datetime_normalizer(value) + def serialize_due(self, value): return self.timestamp_serializer(value)