Alternatively, you can inherit the basic functionality and just add the output you are looking for. (again with a custom filter).
, 'c', ( , c... ) a/A. a/A. . :
{{ datetime|smartdate:"h:i A" }} = '12:30 AM'
{{ datetime|smartdate:"h:i Ac" }} = '12:30 A.M.'
{{ datetime|smartdate:"h:i a" }} = '12:30 a.m.'
{{ datetime|smartdate:"h:i ac" }} = '12:30 am'
...
import re
from django.template.defaultfilters import date as date_filter
@register.filter
def smartdate(value, arg):
rendered = date_filter(value, arg)
if 'c' in arg:
rendered = re.sub('(a|p)\.m\.c', lambda m: '%sm' % m.group(1), rendered)
rendered = re.sub('(A|P)Mc', lambda m: '%s.M.' % m.group(1), rendered)
return rendered
-