Browse Source

fix date_format to actually work..

main
John-Mark Gurney 3 years ago
parent
commit
cb5a12ba06
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      hyde/ext/templates/jinja.py

+ 1
- 1
hyde/ext/templates/jinja.py View File

@@ -89,7 +89,7 @@ def urldecode(ctx, url):
def date_format(ctx, dt, fmt=None): def date_format(ctx, dt, fmt=None):
if not dt: if not dt:
dt = datetime.now() dt = datetime.now()
if not isinstance(dt, datetime) or \
if not isinstance(dt, datetime) and \
not isinstance(dt, date): not isinstance(dt, date):
logger.error("Date format called on a non date object") logger.error("Date format called on a non date object")
return dt return dt


Loading…
Cancel
Save