7089: copy fix from BirthdayReport to Calendar

Evil cut and paste of a bug fix,
following the evil cut and paste of the original code...

svn: r23212
This commit is contained in:
Vassilii Khachaturov 2013-09-27 23:19:00 +00:00
parent 01a83099ae
commit 8365ea7090

View File

@ -52,6 +52,7 @@ from Utils import probably_alive
from DateHandler import displayer as _dd from DateHandler import displayer as _dd
import GrampsLocale import GrampsLocale
import gen.lib import gen.lib
from gen.lib.date import gregorian
import libholiday import libholiday
from libholiday import g2iso from libholiday import g2iso
@ -280,6 +281,8 @@ class Calendar(Report):
birth_date = birth_event.get_date_object() birth_date = birth_event.get_date_object()
if (self.birthdays and birth_date is not None and birth_date.is_valid()): if (self.birthdays and birth_date is not None and birth_date.is_valid()):
birth_date = gregorian(birth_date)
year = birth_date.get_year() year = birth_date.get_year()
month = birth_date.get_month() month = birth_date.get_month()
day = birth_date.get_day() day = birth_date.get_day()
@ -360,6 +363,8 @@ class Calendar(Report):
event_obj = event.get_date_object() event_obj = event.get_date_object()
if event_obj.is_valid(): if event_obj.is_valid():
event_obj = gregorian(event_obj)
year = event_obj.get_year() year = event_obj.get_year()
month = event_obj.get_month() month = event_obj.get_month()
day = event_obj.get_day() day = event_obj.get_day()