Added display patch from Don Peterson, and fixed '?' date in Oct 9, ? format.

svn: r718
This commit is contained in:
Don Allingham 2002-01-23 03:07:23 +00:00
parent d587ba864d
commit b3f6270cd1

View File

@ -361,7 +361,7 @@ class SingleDate:
start = "^\s*" + modifiers + "?\s*" start = "^\s*" + modifiers + "?\s*"
fmt1 = compile(start+"(\S+)(\s+\d+\s*,)?\s*(\d+)?\s*$", IGNORECASE) fmt1 = compile(start+"(\S+)(\s+\d+\s*,)?\s*([?\d]+)?\s*$", IGNORECASE)
fmt2 = compile(start+"(\d+)\.?\s+(\S+)(\s+\d+)?\s*$", IGNORECASE) fmt2 = compile(start+"(\d+)\.?\s+(\S+)(\s+\d+)?\s*$", IGNORECASE)
fmt3 = compile(start+r"([?\d]+)\s*[./-]\s*([?\d]+)\s*[./-]\s*([?\d]+)\s*$", fmt3 = compile(start+r"([?\d]+)\s*[./-]\s*([?\d]+)\s*[./-]\s*([?\d]+)\s*$",
IGNORECASE) IGNORECASE)
@ -648,7 +648,7 @@ class SingleDate:
retval = "%04d%s??%s%02d" % (self.year,sep,sep,self.day) retval = "%04d%s??%s%02d" % (self.year,sep,sep,self.day)
else: else:
if self.year == UNDEF: if self.year == UNDEF:
retval = "????%02d%s%02d%s" % (self.month+1,sep,self.day,sep) retval = "????%s%02d%s%02d" % (sep,self.month+1,sep,self.day)
else: else:
retval = "%02d%s%02d%s%02d" % (self.year,sep,self.month+1,sep,self.day) retval = "%02d%s%02d%s%02d" % (self.year,sep,self.month+1,sep,self.day)