Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Like timesince, but returns a string measuring the time until
the given time.

        def timeuntil(d, now=None):
    """
    Like timesince, but returns a string measuring the time until
    the given time.
    """
    return timesince(d, now, reversed=True)
        


src/c/o/confine-controller-0.10.5/controller/admin/utils.py   confine-controller(Download)
 
from controller.models.utils import get_field_value
from controller.utils.time import timesince, timeuntil
 
 
def display_timeuntil(date):
    date_rel = timeuntil(date) + ' left'
    date_abs = date.strftime("%Y-%m-%d %H:%M:%S %Z")
    return mark_safe("<span title='%s'>%s</span>" % (date_abs, date_rel))