7065: Calendar conversion broken for negative date

fixed, repro steps work as expected now
date_test still broken due to further blocking issues,
see #7045

svn: r23123
This commit is contained in:
Vassilii Khachaturov 2013-09-14 14:23:58 +00:00
parent 9c47f96b9c
commit 37e82106dc

View File

@ -1488,7 +1488,7 @@ class Date(object):
return self.text
def _zero_adjust_ymd(self, y, m, d):
year = max(y, 1)
year = y if y != 0 else 1
month = max(m, 1)
day = max(d, 1)
return (year, month, day)