Example #1
0
def until_time(value):
    '''
    Creates a display string to show the time until the specified date.
    '''
    if (value):
        timeDelta = getTimeDelta(getCurrentDateTime(), value)
        
        return timeDeltaFormatter(timeDelta)
        
    return ""
Example #2
0
def time_since(value):
    '''
    Creates a display string to show the time since the specified date.
    '''
    if (value):
        timeDelta = getTimeDelta(value, getCurrentDateTime())
        
        return timeDeltaFormatter(timeDelta)
        
    return ""