#NEWLINE# def get_next_value( self , date , field ) : #NEWLINE# #INDENT# start = field . get_value ( date ) #NEWLINE# minval = field . get_min ( date ) #NEWLINE# maxval = field . get_max ( date ) #NEWLINE# start = max ( start , minval ) #NEWLINE# if ( not self . step ) : #NEWLINE# #INDENT# next = start #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# distance_to_next = ( ( self . step - ( start - minval ) ) % field . step ) #NEWLINE# next = ( start + distance_to_next ) #NEWLINE# #UNINDENT# if ( next <= maxval ) : #NEWLINE# #INDENT# return next