7045: enable cal switch in editor on empty dates

svn: r23179
This commit is contained in:
Vassilii Khachaturov 2013-09-21 09:06:34 +00:00
parent b01b42fab6
commit 5f1a362e51

View File

@ -1610,16 +1610,11 @@ class Date(object):
for d,m,y,sl in zip(*[iter(zl)]*4):
# each of d,m,y,sl is a pair from dateval and value, to compare
for adjusted,original in d,m:
for adjusted,original in d,m,y:
if adjusted != original and not(original == 0 and adjusted == 1):
raise DateError("Invalid day/month {} passed in value {}".
raise DateError("Invalid day/month/year {} passed in value {}".
format(original, value))
adjusted,original = y
if adjusted != original:
raise DateError("Invalid year {} passed in value {}".
format(original, value))
# ignore slash difference
if text: