12 lines
289 B
Python
12 lines
289 B
Python
from django import template
|
|
from django.utils.dateparse import parse_date
|
|
|
|
register = template.Library()
|
|
|
|
|
|
@register.simple_tag
|
|
def get_weekday(year, month, day):
|
|
return parse_date(
|
|
"%(year)s-%(month)s-%(day)s" % {"year": year, "month": month, "day": day}
|
|
).strftime("%A")
|