def date_to_rfc1123(date):
 return (datetime.strftime(date, RFC1123_DATE_FORMAT) if date else None)

def date_to_rfc1123 ( date ) : return ( datetime . strftime ( date , RFC1123_DATE_FORMAT ) if date else None )
converts a datetime value to the corresponding rfc-1123 string .