src/plugins/DecendReport.py: use full dates instead of just year.
svn: r6238
This commit is contained in:
parent
85be495c51
commit
378e3e97c3
@ -1,5 +1,6 @@
|
|||||||
2006-03-30 Brian Matherly <pez4brian@users.sourceforge.net>
|
2006-03-30 Brian Matherly <pez4brian@users.sourceforge.net>
|
||||||
* src/plugins/GraphViz.py: import const
|
* src/plugins/GraphViz.py: import const
|
||||||
|
* src/plugins/DecendReport.py: use full dates instead of just year.
|
||||||
|
|
||||||
2006-03-30 Don Allingham <don@gramps-project.org>
|
2006-03-30 Don Allingham <don@gramps-project.org>
|
||||||
* src/Editors/_EditFamily.py: add surname guessing back in
|
* src/Editors/_EditFamily.py: add surname guessing back in
|
||||||
|
@ -41,6 +41,7 @@ import Errors
|
|||||||
import Sort
|
import Sort
|
||||||
from QuestionDialog import ErrorDialog
|
from QuestionDialog import ErrorDialog
|
||||||
import NameDisplay
|
import NameDisplay
|
||||||
|
import DateHandler
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -88,22 +89,18 @@ class DescendantReport(Report.Report):
|
|||||||
birth_ref = person.get_birth_ref()
|
birth_ref = person.get_birth_ref()
|
||||||
if birth_ref:
|
if birth_ref:
|
||||||
birth = self.database.get_event_from_handle(birth_ref.ref)
|
birth = self.database.get_event_from_handle(birth_ref.ref)
|
||||||
birth_date = birth.get_date_object()
|
birth_date = DateHandler.get_date(birth)
|
||||||
birth_year_valid = birth_date.get_year_valid()
|
|
||||||
else:
|
else:
|
||||||
birth_year_valid = 0
|
|
||||||
birth = None
|
birth = None
|
||||||
|
|
||||||
death_ref = person.get_death_ref()
|
death_ref = person.get_death_ref()
|
||||||
if death_ref:
|
if death_ref:
|
||||||
death = self.database.get_event_from_handle(death_ref.ref)
|
death = self.database.get_event_from_handle(death_ref.ref)
|
||||||
death_date = death.get_date_object()
|
death_date = DateHandler.get_date(death)
|
||||||
death_year_valid = death_date.get_year_valid()
|
|
||||||
else:
|
else:
|
||||||
death = None
|
death = None
|
||||||
death_year_valid = 0
|
|
||||||
|
|
||||||
if birth_year_valid or death_year_valid:
|
if birth or death:
|
||||||
self.doc.write_text(' (')
|
self.doc.write_text(' (')
|
||||||
|
|
||||||
birth_place = ""
|
birth_place = ""
|
||||||
@ -120,28 +117,28 @@ class DescendantReport(Report.Report):
|
|||||||
death_place = self.database.get_place_from_handle(
|
death_place = self.database.get_place_from_handle(
|
||||||
dplace_handle).get_title()
|
dplace_handle).get_title()
|
||||||
|
|
||||||
if birth_year_valid:
|
if birth:
|
||||||
if birth_place:
|
if birth_place:
|
||||||
self.doc.write_text(_("b. %(birth_year)d - %(place)s") % {
|
self.doc.write_text(_("b. %(birth_date)s - %(place)s") % {
|
||||||
'birth_year' : birth_date.get_year(),
|
'birth_date' : birth_date,
|
||||||
'place' : birth_place,
|
'place' : birth_place,
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
self.doc.write_text(_("b. %(birth_year)d") % {
|
self.doc.write_text(_("b. %(birth_date)s") % {
|
||||||
'birth_year' : birth_date.get_year()
|
'birth_date' : birth_date
|
||||||
})
|
})
|
||||||
|
|
||||||
if death_year_valid:
|
if death:
|
||||||
if birth_year_valid:
|
if birth:
|
||||||
self.doc.write_text(', ')
|
self.doc.write_text(', ')
|
||||||
if death_place:
|
if death_place:
|
||||||
self.doc.write_text(_("d. %(death_year)d - %(place)s") % {
|
self.doc.write_text(_("d. %(death_date)s - %(place)s") % {
|
||||||
'death_year' : death_date.get_year(),
|
'death_date' : death,
|
||||||
'place' : death_place,
|
'place' : death_place,
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
self.doc.write_text(_("d. %(death_year)d") % {
|
self.doc.write_text(_("d. %(death_date)s") % {
|
||||||
'death_year' : death_date.get_year()
|
'death_date' : death
|
||||||
})
|
})
|
||||||
|
|
||||||
self.doc.write_text(')')
|
self.doc.write_text(')')
|
||||||
|
Loading…
Reference in New Issue
Block a user