Browse Source

Fixed tautology in date formatter

Ralfp 12 years ago
parent
commit
005aae4df8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      misago/template/templatetags/django2jinja.py

+ 1 - 1
misago/template/templatetags/django2jinja.py

@@ -93,7 +93,7 @@ def reldate(val, arg=""):
     if format(local, 'Y-z') == format(tomorrow, 'Y-z'):
         return _("Tomorrow, %(hour)s") % {'hour': time_format(local, formats['TIME_FORMAT'])}
     # Day of Week check
-    if format(local, 'D') != format(local_now, 'D') and (diff.days > -7 or diff.days < 7):
+    if format(local, 'D') != format(local_now, 'D') and diff.days > -7 and diff.days < 7:
         return _("%(day)s, %(hour)s") % {'day': format(local, 'l'), 'hour': time_format(local, formats['TIME_FORMAT'])}
 
     # Fallback to custom