예제 #1
0
def timeuntil(value, *args):
    if value is None or isinstance(value, Undefined):
        return u""
    from django.utils.timesince import timeuntil

    value = template_localtime(value)
    return timeuntil(value, *args)
예제 #2
0
def timeuntil(value, *args):
    if value is None or isinstance(value, Undefined):
        return u''
    from django.utils.timesince import timeuntil

    value = template_localtime(value)
    return timeuntil(value, *args)
예제 #3
0
def time(value, arg=None):
    if value is None or isinstance(value, Undefined):
        return u''
    from django.conf import settings
    from django.utils.dateformat import time_format
    if arg is None:
        arg = settings.TIME_FORMAT

    value = template_localtime(value)
    return time_format(value, arg)
예제 #4
0
def time(value, arg=None):
    if value is None or isinstance(value, Undefined):
        return u""
    from django.conf import settings
    from django.utils.dateformat import time_format

    if arg is None:
        arg = settings.TIME_FORMAT

    value = template_localtime(value)
    return time_format(value, arg)