@register.filter
def datetime(t, fmt=None):
    if fmt is None:
        fmt = _(u'%B %e, %Y')
    if not six.PY3:
        # The datetime.strftime function strictly does not
        # support Unicode in Python 2 but is Unicode only in 3.x.
        fmt = fmt.encode('utf-8')
    return smart_text(t.strftime(fmt)) if t else ''
Call ``datetime.strftime`` with the given format string.
dataset/ETHPy150Open jbalogh/jingo/jingo/helpers.py/datetime