--- a/src/ztfy/utils/date.py Mon Sep 15 12:50:49 2014 +0200
+++ b/src/ztfy/utils/date.py Thu Mar 26 15:37:02 2015 +0100
@@ -86,7 +86,12 @@
def formatDate(value, format=EXT_DATE_FORMAT, request=None):
if request is None:
request = queryRequest()
- return datetime.strftime(tztime(value), translate(format, context=request).encode('utf-8')).decode('utf-8')
+ if value.year >= 1900:
+ return datetime.strftime(tztime(value), translate(format, context=request).encode('utf-8')).decode('utf-8')
+ else:
+ return format.replace('%d', str(value.day)) \
+ .replace('%m', str(value.month)) \
+ .replace('%Y', str(value.year))
def formatDatetime(value, format=EXT_DATETIME_FORMAT, request=None):