#NEWLINE# def get_message_offset( case ) : #NEWLINE# #INDENT# previous_sunday = get_date ( case , 'previous_sunday' ) #NEWLINE# registration_date = get_date ( case , 'start_date' ) #NEWLINE# if ( ( previous_sunday is not None ) and ( registration_date is not None ) ) : #NEWLINE# #INDENT# delta = ( registration_date - delta ) #NEWLINE# return ( delta . days * 5 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None