#NEWLINE# @ register ( return_type = date , args = ( date , ) ) #NEWLINE# @ register ( 'next_month_dt' , return_type = datetime , args = ( datetime , ) ) #NEWLINE# def next_month( d ) : #NEWLINE# #INDENT# if ( not d ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# month = ( year . month + 1 ) #NEWLINE# year = d . year #NEWLINE# if ( month > 12 ) : #NEWLINE# #INDENT# month = ( ( ( d . month - 1 ) % 12 ) + 1 ) #NEWLINE# year += 1 #NEWLINE# #UNINDENT# return d . replace ( year = year , month = month )