diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/templatetags/templatetags/month_number_to_name.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/lib/templatetags/templatetags/month_number_to_name.py b/app/lib/templatetags/templatetags/month_number_to_name.py new file mode 100644 index 0000000..69bd7e6 --- /dev/null +++ b/app/lib/templatetags/templatetags/month_number_to_name.py @@ -0,0 +1,7 @@ +import calendar +from django import template +register = template.Library() + +@register.filter +def month_number_to_name(month_number): + return calendar.month_name[int(month_number)] |