Revision 1582
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/xml_func.py | ||
---|---|---|
270 | 270 |
except KeyError: pass |
271 | 271 |
else: |
272 | 272 |
if not month.isdigit(): # month is name |
273 |
items['month'] = str(dates.strtotime(month).month) |
|
273 |
try: items['month'] = str(dates.strtotime(month).month) |
|
274 |
except ValueError, e: raise SyntaxException(e) |
|
274 | 275 |
|
275 | 276 |
items = dict(conv_items(format.str2int, items.iteritems())) |
276 | 277 |
items.setdefault('month', 1) |
Also available in: Unified diff
xml_func.py: _date: When converting month name to number, wrap any ValueError in a SyntaxException