Fixed ISO Date format

svn: r1264
This commit is contained in:
Don Allingham 2003-01-20 13:28:33 +00:00
parent d8b7728b11
commit 8fb0e3dcb4

View File

@ -144,7 +144,7 @@ class Date:
def getMonth(self): def getMonth(self):
if self.start.month == UNDEF: if self.start.month == UNDEF:
return UNDEF return UNDEF
return self.start.month+1 return self.start.month
def getMonthValid(self): def getMonthValid(self):
return self.start.month != UNDEF return self.start.month != UNDEF
@ -346,7 +346,7 @@ class SingleDate:
else: else:
m = "-??" m = "-??"
else: else:
m = "-%02d" % (self.month+1) m = "-%02d" % (self.month)
if self.day == UNDEF: if self.day == UNDEF:
d = '' d = ''
else: else:
@ -372,7 +372,7 @@ class SingleDate:
vals = string.split(v,'-') vals = string.split(v,'-')
self.setYearVal(vals[0]) self.setYearVal(vals[0])
if len(vals) > 1: if len(vals) > 1:
self.setMonthVal(int(vals[1])-1) self.setMonthVal(int(vals[1]))
else: else:
self.month = UNDEF self.month = UNDEF
if len(vals) > 2: if len(vals) > 2: