From 8658f5a074ddccd80112634abfb69dbbd24a3518 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 4 Jan 2009 18:05:26 +0000 Subject: [PATCH] Added a __getitem__ method to date Spans which should eventually be removed. I belive that only the Det*Reports.py use them. svn: r11566 --- src/gen/lib/date.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gen/lib/date.py b/src/gen/lib/date.py index 949a9bcb7..a81644015 100644 --- a/src/gen/lib/date.py +++ b/src/gen/lib/date.py @@ -259,6 +259,10 @@ class Span: def is_valid(self): return self.valid + def __getitem__(self, pos): + # Depricated! + return self._diff(self.date1, self.date2)[pos] + def __int__(self): if self.negative: return -self.sort[0]