--- a/src/ztfy/utils/date.py Wed Nov 20 08:46:18 2013 +0100
+++ b/src/ztfy/utils/date.py Tue Dec 03 11:43:33 2013 +0100
@@ -76,14 +76,19 @@
return datetime(value.year, value.month, value.day)
+SH_DATE_FORMAT = _("%d/%m/%Y")
+SH_DATETIME_FORMAT = _("%d/%m/%Y - %H:%M")
+
EXT_DATE_FORMAT = _("on %d/%m/%Y")
EXT_DATETIME_FORMAT = _("on %d/%m/%Y at %H:%M")
+
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')
+
def formatDatetime(value, format=EXT_DATETIME_FORMAT, request=None):
return formatDate(value, format, request)