Revision 720
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/xml_func.py | ||
---|---|---|
58 | 58 |
year = int(year) |
59 | 59 |
month = int(month) |
60 | 60 |
day = int(day) |
61 |
date = datetime.date(year, month, day) |
|
61 | 62 |
except ValueError, e: raise SyntaxException(e) |
62 |
date = datetime.date(year, month, day) |
|
63 | 63 |
return date.strftime('%Y-%m-%d') |
64 | 64 |
|
65 | 65 |
_name_parts_slices_items = [ |
Also available in: Unified diff
xml_func.py: Raise xml_func.SyntaxException for ValueErrors generated by datetime.date() (e.g. month out of range)