From 10d5232085fe57d700d79dd01410bdecc9e89e2d Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 19 Apr 2008 17:04:54 +0000 Subject: [PATCH] Display and sort invalid dates better svn: r10593 --- src/Simple/_SimpleTable.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Simple/_SimpleTable.py b/src/Simple/_SimpleTable.py index 26bf250ac..057ca8354 100644 --- a/src/Simple/_SimpleTable.py +++ b/src/Simple/_SimpleTable.py @@ -228,8 +228,12 @@ class SimpleTable: link = ('Note', item.handle) elif isinstance(item, gen.lib.Date): text = DateHandler.displayer.display(item) - retval.append(text) - self.row_sort_val(col, item.sortval) + if item.get_valid(): + retval.append(text) + self.row_sort_val(col, item.sortval) + else: + retval.append("Invalid: " + text) + self.row_sort_val(col, -1) if (self.__link_col == col or link == None): link = ('Date', item) elif isinstance(item, gen.lib.Span):