From d911ce77602d74106a1d6efe2d2827323893e376 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 4 Sep 2013 10:39:40 +0000 Subject: [PATCH] 7034 and 6965: missing method svn: r23028 --- gramps/gen/lib/date.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gramps/gen/lib/date.py b/gramps/gen/lib/date.py index 23e4e5b78..cf05d3fab 100644 --- a/gramps/gen/lib/date.py +++ b/gramps/gen/lib/date.py @@ -1296,6 +1296,16 @@ class Date(object): self.dateval = tuple(dv) self._calc_sort_value() + def set2_yr_mon_day(self, year, month, day): + """ + Set the year, month, and day values. + """ + dv = list(self.dateval) + dv[Date._POS_RYR] = year + dv[Date._POS_RMON] = month + dv[Date._POS_RDAY] = day + self.dateval = tuple(dv) + def set_yr_mon_day_offset(self, year=0, month=0, day=0): """ Set the year, month, and day values by offset. @@ -1355,6 +1365,7 @@ class Date(object): elif dv[Date._POS_RMON] > 12 or dv[Date._POS_RMON] < 1: dv[Date._POS_RYR] += int(dv[Date._POS_RMON] / 12) dv[Date._POS_RMON] = dv[Date._POS_RMON] % 12 + self.dateval = tuple(dv) if day != 0 or dv[Date._POS_RDAY] > 28: self.set2_yr_mon_day(*self.offset(day))