Files @ 47a30a750ad1
Branch filter:

Location: website/www/podjango/templatetags/date_within.py

bsturmfels
Sort Python imports with isort
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)))