* src/Date.py: Reset date if a empty text string is passed

svn: r2151
This commit is contained in:
Don Allingham 2003-09-20 19:55:45 +00:00
parent 790393ac38
commit e0b537f7c8

View File

@ -194,6 +194,14 @@ class Date:
return compare_dates(self,other) == 0
def set(self,text):
if text.strip() == "":
self.start = SingleDate()
self.stop = None
self.range = 0
self.text = ""
self.calendar = Gregorian.Gregorian()
return
try:
match = Date.fmt.match(text)
if match: