From fadeb3744e26a3ce4e577b2eb07835872fb53a67 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sat, 27 Dec 2008 16:40:25 +0000 Subject: [PATCH] Added lt and gt for date span comparisons svn: r11523 --- src/gen/lib/date.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gen/lib/date.py b/src/gen/lib/date.py index 282474258..8ea68b93c 100644 --- a/src/gen/lib/date.py +++ b/src/gen/lib/date.py @@ -101,6 +101,17 @@ class Span: return False return self.diff_tuple == other.diff_tuple + def __lt__(self, other): + if other is None: + return False + return self.diff_tuple < other.diff_tuple + + def __gt__(self, other): + if other is None: + return False + return self.diff_tuple > other.diff_tuple + + #------------------------------------------------------------------------- # # Date class