* src/DateParser.py: dynamically detect numerical parsing based
off locale. Do not depend on strptime. * src/Utils.py: remove last remains of SingleDate * src/PeopleModel.py: display "error" instead of a blank string on an error * src/EventEdit.py: removed unused parameter * src/Exporter.py: remove unused gnome.ui import * src/plugins/FanChart.py: remove old Calendar reference * src/plugins/Verify.py: remove old Calendar reference svn: r3620
This commit is contained in:
@@ -35,7 +35,7 @@ import gtk
|
||||
import BaseDoc
|
||||
import Report
|
||||
import Errors
|
||||
import Calendar
|
||||
import Date
|
||||
|
||||
from QuestionDialog import ErrorDialog
|
||||
from SubstKeywords import SubstKeywords
|
||||
@@ -206,7 +206,7 @@ class FanChart:
|
||||
birth_handle = person.get_birth_handle()
|
||||
if birth_handle:
|
||||
b = self.database.get_event_from_handle(birth_handle).get_date_object().get_year()
|
||||
if b == Calendar.UNDEF:
|
||||
if b == 0:
|
||||
b = ""
|
||||
else:
|
||||
b = ""
|
||||
@@ -214,7 +214,7 @@ class FanChart:
|
||||
death_handle = person.get_death_handle()
|
||||
if death_handle:
|
||||
d = self.database.get_event_from_handle(death_handle).get_date_object().get_year()
|
||||
if d == Calendar.UNDEF:
|
||||
if d == 0:
|
||||
d = ""
|
||||
else:
|
||||
d = ""
|
||||
|
||||
@@ -50,7 +50,6 @@ import gtk.glade
|
||||
#------------------------------------------------------------------------
|
||||
import RelLib
|
||||
import Utils
|
||||
import Gregorian
|
||||
|
||||
from gettext import gettext as _
|
||||
|
||||
@@ -117,8 +116,8 @@ class Verify:
|
||||
event = self.db.get_event_from_handle(event_handle)
|
||||
dateObj = event.get_date_object()
|
||||
if dateObj:
|
||||
if dateObj.get_calendar().NAME != Gregorian.Gregorian.NAME:
|
||||
dateObj.set_calendar(Gregorian.Gregorian)
|
||||
if dateObj.get_calendar() != Date.CAL_GREGORIAN:
|
||||
dateObj.set_calendar(Date.CAL_GREGORIAN)
|
||||
year = dateObj.get_year()
|
||||
return year
|
||||
|
||||
|
||||
Reference in New Issue
Block a user