#NEWLINE# def get_period_count( self , start_date , off ) : #NEWLINE# #INDENT# self . ten_offsets_in_days = ( ( start_date + ( off * 10 ) ) - start_date ) . days #NEWLINE# if ( off . ten_offsets_in_days == 0 ) : #NEWLINE# #INDENT# return 1000 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return min ( ( 9 * ( ( Timestamp . max - start_date ) . days // self . ten_offsets_in_days ) ) , 1000 )