@register.filter
def week_number(date):
    week_number = date.strftime('%W')
    if int(week_number) < 10:
        week_number = week_number[-1]
    return week_number
Return the Python week number of a date.
dataset/ETHPy150Open Fantomas42/django-blog-zinnia/zinnia/templatetags/zinnia.py/week_number