From fe4112c8798c32022ce5d9976a587f2b4d9a5f46 2024-03-19 11:20:13 From: Ben Sturmfels Date: 2024-03-19 11:20:13 Subject: [PATCH] Remove duplicate `date_within` template tag --- diff --git a/conservancy/podjango/templatetags/__init__.py b/conservancy/podjango/templatetags/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/conservancy/podjango/templatetags/date_within.py b/conservancy/podjango/templatetags/date_within.py deleted file mode 100644 index f0921170d5ad99d863073f48b5d904b18c756534..0000000000000000000000000000000000000000 --- a/conservancy/podjango/templatetags/date_within.py +++ /dev/null @@ -1,11 +0,0 @@ -from datetime import datetime, timedelta - -from django import template - -register = template.Library() - - -@register.filter -def date_within_past_days(value, arg): - # question: does datetime.now() do a syscall each time is it called? - return value > (datetime.now() - timedelta(days=int(arg)))