From 9e96cd38a7216a0dee7fe6706bcaa38787e63e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 30 Apr 2012 09:55:01 +0200 Subject: [PATCH] add more attributes for formatted dates --- tabellio/documents/document.py | 4 ++++ tabellio/documents/question.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/tabellio/documents/document.py b/tabellio/documents/document.py index e27155f..f9671dc 100644 --- a/tabellio/documents/document.py +++ b/tabellio/documents/document.py @@ -127,3 +127,7 @@ class Document(Item, BasePublication): @property def sanction_date_str(self): return self.sanction_date.strftime('%d/%m/%Y') + + @property + def seance_vote_date_str(self): + return self.seance_vote_date.strftime('%d/%m/%Y') diff --git a/tabellio/documents/question.py b/tabellio/documents/question.py index d09e4a3..55e910e 100644 --- a/tabellio/documents/question.py +++ b/tabellio/documents/question.py @@ -146,6 +146,12 @@ class Question(Item, BasePublication): return '' return self.date.strftime('%d/%m/%Y') + @property + def seance_com_date_str(self): + if not self.date: + return '' + return self.seance_com_date.strftime('%d/%m/%Y') + @property def associated_docs(self): docs = []