Browse Source

Fixed bug in template filter

pull/172/head
Michael Olund 5 years ago
parent
commit
8b8ba3e59e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      edivorce/apps/core/templatetags/format_utils.py

+ 1
- 1
edivorce/apps/core/templatetags/format_utils.py View File

@ -118,7 +118,7 @@ def age(date):
printing '46 years' instead of print '46 years, 7 months'. printing '46 years' instead of print '46 years, 7 months'.
""" """
try: try:
birth = datetime.strptime(date, strptime)
birth = datetime.strptime(date, '%b %d, %Y')
except ValueError: except ValueError:
try: try:
birth = datetime.strptime(date, '%b %d, %Y') birth = datetime.strptime(date, '%b %d, %Y')


Loading…
Cancel
Save