def get_http_expiry(_Expirestype, _num):
 if (_Expirestype == 'd'):
  expire_date = (datetime.datetime.now() + datetime.timedelta(days=_num))
 elif (_Expirestype == 'h'):
  expire_date = (datetime.datetime.now() + datetime.timedelta(hours=_num))
 else:
  expire_date = (datetime.datetime.now() + datetime.timedelta(minutes=_num))
 return expire_date.strftime('%a, %d %b %Y %H:%M:%S GMT')

def get_http_expiry ( _Expirestype , _num ) : if ( _Expirestype == 'd' ) : expire_date = ( datetime . datetime . now ( ) + datetime . timedelta ( days = _num ) ) elif ( _Expirestype == 'h' ) : expire_date = ( datetime . datetime . now ( ) + datetime . timedelta ( hours = _num ) ) else : expire_date = ( datetime . datetime . now ( ) + datetime . timedelta ( minutes = _num ) ) return expire_date . strftime ( '%a, %d %b %Y %H:%M:%S GMT' )
adds the given number of days on to the current date and returns the future date as a string .