* src/DateEdit.py: Take date object as an argument and work with it.

* src/AddrEdit.py: Use date object instead of text.
* src/EditPerson.py: Use date object instead of text.
* src/EventEdit.py: Use date object instead of text.
* src/gramps.glade: Minor cleanup.
* src/Date.py (copy): Add method.
* src/RelLib.py (Address): Correct the use of dates.


svn: r3556
This commit is contained in:
Alex Roitman
2004-09-19 15:17:57 +00:00
parent d382d7b094
commit 75ec685b66
8 changed files with 140 additions and 73 deletions

View File

@ -1723,6 +1723,8 @@ class Address(DataObj):
if provided"""
DataObj.__init__(self,source)
self.dd = DateHandler.create_display()
self.dp = DateHandler.create_parser()
if source:
self.street = source.street
self.city = source.city
@ -1743,12 +1745,14 @@ class Address(DataObj):
def set_date(self,text):
"""attempts to sets the date that the person lived at the address
from the passed string"""
self.date.set(text)
self.date = self.dp.parse(text)
def get_date(self):
"""returns a string representation of the date that the person
lived at the address"""
return self.date.get_date()
if self.date:
return self.dd.display(self.date)
return u""
def get_preferred_date(self):
"""returns a string representation of the date that the person