From ae44c72c82724c8508f57b600085d82b13c78233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 16 Nov 2011 20:13:27 +0100 Subject: [PATCH] add a formatting function for publication date --- tabellio/documents/document.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tabellio/documents/document.py b/tabellio/documents/document.py index 962ea65..e2c0269 100644 --- a/tabellio/documents/document.py +++ b/tabellio/documents/document.py @@ -82,3 +82,7 @@ class Document(Item, BasePublication): r = BasePublication.related_elements(self, max_items, closeness) doc_ids = [x.id for x in self.associated_docs] return [x for x in r if x.getId() not in doc_ids] + + @property + def publication_date_str(self): + return self.publication_date.strftime('%d/%m/%Y')