apply rev 8351 to 3.0 branch: text date with correct modifier

svn: r8994
This commit is contained in:
Benny Malengier 2007-09-20 19:29:50 +00:00
parent 0ad9c66215
commit 0d186e8c5b

View File

@ -528,7 +528,10 @@ class DateParser:
grps = match.groups()
start = self._parse_subdate(grps[1], self.parser[cal])
mod = self.modifier_to_int.get(grps[0].lower(), Date.MOD_NONE)
if bc:
if start == Date.EMPTY:
date.set_modifier(Date.MOD_TEXTONLY)
date.set_text_value(text)
elif bc:
date.set(qual, mod, cal, self.invert_year(start))
else:
date.set(qual, mod, cal, start)