#NEWLINE# def as_string( self ) : #NEWLINE# #INDENT# '\n        Returns the delivery time as string.\n        ' #NEWLINE# if ( self . min == 0 ) : #NEWLINE# #INDENT# self . min = self . max #NEWLINE# #UNINDENT# if ( self . min == self . max ) : #NEWLINE# #INDENT# if ( self . min == 1 ) : #NEWLINE# #INDENT# unit = DELIVERY_TIME_UNIT_SINGULAR [ self . unit ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# unit = self . get_unit_display ( ) #NEWLINE# #UNINDENT# return ( '%s %s' % ( self . min , unit ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( '%s-%s %s' % ( self . min , self . max , self . get_unit_display ( ) ) )