'implements the interval functionality for expressions
format for Postgres:
(datefield + interval \'3 days 200 seconds 5 microseconds\')'

def date_interval_sql(self, sql, connector, timedelta):

    modifiers = []
    if timedelta.days:
        modifiers.append((u'%s    days' % timedelta.days))
    if timedelta.seconds:
        modifiers.append((u'%s    seconds' % timedelta.seconds))
    if timedelta.microseconds:
        modifiers.append((u'%s    microseconds' % timedelta.microseconds))
    mods = u'    '.join(modifiers)
    conn = (u'    %s    ' % connector)
    return (u'(%s)' % conn.join([sql, (u"interval    '%s'" % mods)]))
