2017-02-08 22:34:24 +00:00
|
|
|
from django import template
|
|
|
|
from django.utils.dateparse import parse_date
|
2019-06-16 12:32:24 +00:00
|
|
|
|
2017-02-08 22:34:24 +00:00
|
|
|
register = template.Library()
|
|
|
|
|
2019-06-16 12:32:24 +00:00
|
|
|
|
2017-02-08 22:34:24 +00:00
|
|
|
@register.simple_tag
|
|
|
|
def get_weekday(year, month, day):
|
2019-06-16 12:32:24 +00:00
|
|
|
return parse_date(
|
|
|
|
"%(year)s-%(month)s-%(day)s" % {"year": year, "month": month, "day": day}
|
|
|
|
).strftime("%A")
|