7045: enable cal switch in editor on empty dates
svn: r23178
This commit is contained in:
parent
9dc5890ca7
commit
0908abf1a2
@ -1616,16 +1616,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:
|
||||
|
Loading…
Reference in New Issue
Block a user