Example #1
0
def datetimeformat_filter(obj, html=True, prefixed=True):
    rv = format_datetime(obj)
    if prefixed:
        rv = _(u'on %s') % rv
    if html:
        rv = u'<span class="datetime" title="%s">%s</span>' % (
            obj.strftime('%Y-%m-%dT%H:%M:%SZ'), escape(rv))
    return Markup(rv)
Example #2
0
def datetimeformat_filter(obj, html=True, prefixed=True):
    rv = format_datetime(obj)
    if prefixed:
        rv = _(u'on %s') % rv
    if html:
        rv = u'<span class="datetime" title="%s">%s</span>' % (
            obj.strftime('%Y-%m-%dT%H:%M:%SZ'),
            escape(rv)
        )
    return rv
Example #3
0
File: kb.py Project: Plurk/Solace
 def _format_entry(author, date, extra=u''):
     return _(u'%s (%s)') % (author, format_datetime(date)) + extra
Example #4
0
 def _format_entry(author, date, extra=u''):
     return _(u'%s (%s)') % (author, format_datetime(date)) + extra
Example #5
0
 def _format_entry(author, date, extra=u""):
     return _(u"%s (%s)") % (author, format_datetime(date)) + extra