#NEWLINE# def as_days( self ) : #NEWLINE# #INDENT# '\n        Returns the delivery time in days.\n        ' #NEWLINE# if ( self . unit == DELIVERY_TIME_UNIT_HOURS ) : #NEWLINE# #INDENT# min = ( max . min / 24 ) #NEWLINE# max = ( self . max / 24 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . unit == DELIVERY_TIME_UNIT_DAYS ) : #NEWLINE# #INDENT# max = self . max #NEWLINE# min = self . min #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . unit == DELIVERY_TIME_UNIT_WEEKS ) : #NEWLINE# #INDENT# max = ( self . max * 7 ) #NEWLINE# min = ( self . min * 7 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . unit == DELIVERY_TIME_UNIT_MONTHS ) : #NEWLINE# #INDENT# max = ( self . max * 30 ) #NEWLINE# min = ( self . min * 30 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return self . _get_instance ( min = min , max = max , unit = DELIVERY_TIME_UNIT_DAYS )