def add_time_interval(base_time, interval, textparser=parsedatetime.Calendar()):
 if interval.strip().isdigit():
  interval += ' days'
 tzinfo = (base_time.tzinfo or pytz.UTC)
 return textparser.parseDT(interval, base_time, tzinfo=tzinfo)[0]

def add_time_interval ( base_time , interval , textparser = parsedatetime . Calendar ( ) ) : if interval . strip ( ) . isdigit ( ) : interval += ' days' tzinfo = ( base_time . tzinfo or pytz . UTC ) return textparser . parseDT ( interval , base_time , tzinfo = tzinfo ) [ 0 ]
parse the time specified time interval .